Announcement

Collapse
No announcement yet.

[SOLVED] BUG in code generation SC7 and likely in SC8

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] BUG in code generation SC7 and likely in SC8

    My code:
    sc_field_display({DT_PEOPLESOFT1},(strpos($waarde, '1,')!=FALSE)?'on':'off');

    The generated code:
    $this->nmgp_cmp_hidden["dt_peoplesoft1"] = "(strpos(waarde"; $this->NM_ajax_info['fieldDisplay']['dt_peoplesoft1'] = '(strpos(waarde';!=FALSE)?'on':'off');


    How it should be
    $this->nmgp_cmp_hidden["dt_peoplesoft1"] = "(strpos(waarde"; $this->NM_ajax_info['fieldDisplay']['dt_peoplesoft1'] = '(strpos(waarde'!=FALSE)?'on':'off');

    Apparently there is something weird here... I bet that this also exists in sc 8
    So if I start using (a?b:c) then the parsers makes buggy code....

  • #2
    Hello,

    Issue reported to our bugs team.

    regards,
    Bernhard Bernsmann

    Comment


    • #3
      Hello,

      this is not a bug, you're simply using the macro incorrectly. Macros Scriptcase receive specific parameters, and the parameter that was a code, so Scriptcase not understand and reports an error.
      Best regards,
      Thomas Soares.
      ScriptCase International.

      Email: t.soares@scriptcase.net
      Visit our Blog: http://www.scriptcase.net/blog/
      Visit out fan page: http://www.facebook.com/Scriptcase

      Comment


      • #4
        The idea is that the code within the macro get's evaluated and the result used. Using macro's look like an ordinary function where this is no issue at all!
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X