[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…

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

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.

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!