4 Replies Latest reply on Jun 19, 2017 5:27 AM by giulio@sinapsistudio.it

    Unexpected behavior for calculation in custom window

    giulio@sinapsistudio.it

      In a script test, I want to show some data in a custom window. the script (quick translation from original italian):

       

      Show custom window. [ Title: "Attention, Please"; Messagge:

      "-$$FF:" & $$FormFactor

      & "¶¶" & PatternCount ($$FormFactor; "web")=0 & "¶¶" &

      "-calc:" &

      Case (
      PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) ; "Pro" ;

      PatternCount ( Get ( ApplicationVersion ) ; "iPad" ) ; "iPad" ;

      PatternCount ( Get ( ApplicationVersion ) ; "Server" ) ; "Server" ;

      PatternCount ( Get ( ApplicationVersion ) ; "web" ) ; "web" ;

      PatternCount ( Get ( ApplicationVersion ) ; "iPhone" ) ; "iPhone";

      "" )

      & "¶¶" &
      "-get:" & Get ( VersioneApplicazione ); Pulsante predefinito:
      “OK”, Assegna: “Sì”; Pulsante 2: “Annulla”, Assegna: “No” ]

       

      i'm expeted a output like this:

       

      -$$FF:web

       

      -calc:web

       

      -get: boring string with details

       

       

      but the result was:

       

      0

       

      the calculation perform well if I remove PatternCount ($$FormFactor; "web")=0  OR i put it in a Evaluate() function.

      If I change the funciont in  PatternCount ($$FormFactor; "web")=1 the result is still 0.

       

      not a big problem, but interesting. Some suggestion?