Correct syntax for "," inside set action

  • Hi, please whats is wrong in the code below:
    Line 39:

    With x=60 run ok... How to define the device in this case? ( is wrong)
    Thanks for your help!

  • Hi, Index, thanks for your answer. I was trying that code before but it didn't work for me: (line code 43 and 44). If I comment this line and write for example: x=60 then works fine. *confused* I also notice that in the klaus example the quotes do not appear either because it's a simplified version of "set".
    (...) x.normal=60,, instead x.normal="60","0", (...)

    Edited once, last by Fernando (January 30, 2023 at 3:51 PM).

  • Hi,

    this would be the correct syntax:

      x=calc( ? 0 : 60),

    The 'x.normal' and '' are xml-parsing filters - that means during loading/parsing the xml file, xml attributes that have a dot will get filtered depending on the condition after the dot - see also here:

    For dynamic/runtime code, an explicit device checking would be need, e.g. like an if() check or an expression with a Ternary operator (if ? then-value : else-value)

    Best regards,

  • Hi, Klaus, thanks for your answer. But does not work: (Line 8 of code)

    I temporalily (only for this question) upload your example with the code you suggest, but in mobile device the close button is moved as in normal device (60 pixels to the left and not zero as it would correspond).
    See in

    Edited once, last by Fernando (January 30, 2023 at 10:33 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!