Loading ...
Sorry, an error occurred while loading the content.

Trailing spaces in wizards handled differently {} and []

Expand Messages
  • joy8388608
    Is this known? Is this by design? Is there any way around it? I just noticed (NTL 7.01.25) that, when inputting values with a wizard dialog, trailing spaces
    Message 1 of 3 , Aug 24, 2012
    • 0 Attachment
      Is this known? Is this by design? Is there any way around it?

      I just noticed (NTL 7.01.25) that, when inputting values with a wizard dialog, trailing spaces are removed when brackets are used but kept when braces are used.

      Trailing spaces matter very much when entering a search value or a string to use as a delimiter and in many other cases. Changing from braces to brackets or back can have unexpected results as I just found out.

      Joy

      ; Using braces keeps trailing spaces
      ;^!Set %searchstring%=^?{Enter all spaces or a string with trailing spaces}

      ; Using brackets loses trailing spaces
      ^!Set %searchstring%=^?[Enter all spaces or a string with trailing spaces]

      ^!Prompt Size of searchstring is ^$StrSize("^%searchstring%")$ (^%searchstring%)
    • hsavage
      ... wizard dialog, trailing spaces are removed when brackets are used but kept when braces are used. ... string to use as a delimiter and in many other cases.
      Message 2 of 3 , Aug 24, 2012
      • 0 Attachment
        On 8/24/2012 2:06 PM, joy8388608 wrote:
        > Is this known? Is this by design? Is there any way around it?
        >
        > I just noticed (NTL 7.01.25) that, when inputting values with a
        wizard dialog, trailing spaces are removed when brackets are used but
        kept when braces are used.
        >
        > Trailing spaces matter very much when entering a search value or a
        string to use as a delimiter and in many other cases. Changing from
        braces to brackets or back can have unexpected results as I just found out.
        >
        > Joy
        >
        > ; Using braces keeps trailing spaces
        > ;^!Set %searchstring%=^?{Enter all spaces or a string with trailing
        spaces}
        >
        > ; Using brackets loses trailing spaces
        > ^!Set %searchstring%=^?[Enter all spaces or a string with trailing
        spaces]
        >
        > ^!Prompt Size of searchstring is ^$StrSize("^%searchstring%")$
        (^%searchstring%)

        Joy,

        A line, or 3, from Variables in ClipCode help;

        Note that you must use the curly braces format ^?{ } rather than the
        square brackets ^?[ ] if you want to assign the result from a Clip
        wizard memo field. Example: ^!Set %NewVariable%=^?{(T=M)Message}

        So, apparently, this is known and by design. I'm reasonably sure this
        hasn't changed in a very long, just remember to favor braces in clip
        wizards.

        With a more judicious placement of double quotes, as in the modified
        lines below, you can get 2 equal length strings ending with spaces.
        --^!Set %searchstring1%="^?{Enter all spaces or a string with trailing
        spaces}"
        --^!Set %searchstring2%="^?[Enter all spaces or a string with trailing
        spaces]"

        ···············································
        ¤• JD#...238 - ¤• SL...290 - 12.08.25~01.10.49

        • Bumper Sticker,
        • Suburbia: Where They Tear Out The Trees
        • Then Name Streets After Them.

        € hrs € hsavage € pobox € com^~
      • Eric Fookes
        Hi Joy, I ll look into this once I start working on the next NoteTab maintenance release... -- Regards, Eric Fookes http://www.fookes.com/
        Message 3 of 3 , Sep 10, 2012
        • 0 Attachment
          Hi Joy,

          I'll look into this once I start working on the next NoteTab maintenance
          release...

          --
          Regards,

          Eric Fookes
          http://www.fookes.com/


          On 24/08/2012 21:06, joy8388608 wrote:
          > Is this known? Is this by design? Is there any way around it?
          >
          > I just noticed (NTL 7.01.25) that, when inputting values with a wizard dialog, trailing spaces are removed when brackets are used but kept when braces are used.
          >
          > Trailing spaces matter very much when entering a search value or a string to use as a delimiter and in many other cases. Changing from braces to brackets or back can have unexpected results as I just found out.
          >
          > Joy
          >
          > ; Using braces keeps trailing spaces
          > ;^!Set %searchstring%=^?{Enter all spaces or a string with trailing spaces}
          >
          > ; Using brackets loses trailing spaces
          > ^!Set %searchstring%=^?[Enter all spaces or a string with trailing spaces]
          >
          > ^!Prompt Size of searchstring is ^$StrSize("^%searchstring%")$ (^%searchstring%)
        Your message has been successfully submitted and would be delivered to recipients shortly.