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

Re: [Clip] RE: [NTB] Leading ## in ^!InsertText (Moved to Clips)

Expand Messages
  • Eric Fookes
    Hi Art, ... I can t reproduce this issue. Do you have a some Clip code that demonstrates the problem? -- Regards, Eric Fookes http://www.fookes.com/
    Message 1 of 9 , May 3, 2012
    • 0 Attachment
      Hi Art,

      >>> Leading ## chars in ^!InsertText are not inserted but are ignored/receive
      >>> special treatment. IIRC, someone pointed out where in the help files
      >>> this was discussed but I can't find it.

      I can't reproduce this issue. Do you have a some Clip code that
      demonstrates the problem?

      --
      Regards,

      Eric Fookes
      http://www.fookes.com/
    • Art Kocsis
      ... Thanks Flo. My simple workaround was to prepend a space in front of the # s but, as you noted, my question was why the behavior. [see my next post] Art
      Message 2 of 9 , May 3, 2012
      • 0 Attachment
        At 5/3/2012 06:59 AM, Flo wrote:
        >--- In <mailto:ntb-clips%40yahoogroups.com>ntb-clips@yahoogroups.com,
        >"John Shotsky" <jshotsky@...> wrote:
        > > Here is what the help says about it:
        > > The sequence (?# marks the start of a comment that continues up
        > > to the next closing parenthesis. Nested parentheses are
        >
        >John,
        >IMHO, you are missing the point in this topic. As Art already said, this
        >is no RegEx issue. So there's nothing to "escape" here. If '###" would
        >denote a RegEx, then '^!InsertText' wouldn't interprete that "pattern" as
        >a RegEx but would insert it just as a literal string.

        Thanks Flo.

        My simple workaround was to prepend a space in front of the "#"s but, as
        you noted, my question was why the behavior. [see my next post]

        Art
      • Art Kocsis
        ... Duh!!! No, the issue is with my eyes and a forgiving script interpreter! I was missing a % in a series of variable names, specifically the % after
        Message 3 of 9 , May 3, 2012
        • 0 Attachment
          At 5/3/2012 07:14 AM, Axel wrote:
          >Art Kocsis wrote:
          > > This is a simple clip statement: ^!InsertText ######Text to be inserted
          > > yet the "#"s are ignored and only the following text is inserted.
          >
          >I can't reproduce that, the hashes are inserted just as normal letters
          >be. Is it possible that the issue is not with Clips but with the kind of
          >text you're editing into? Are hashes interpreted as some kind of comment
          >sign there?

          Duh!!! No, the issue is with my eyes and a "forgiving" script interpreter!

          I was missing a "%" in a series of variable names, specifically the "%"
          after the "^%nl" in this code:

          ^!Set %mark%=######
          ...
          ^!Set %ctxt%=^%ctxt%^%nl^%mark% ^%cnt%......

          Notetab did not flag it as an error but interpreted the ^%nl^%mark% as
          an undefined (empty) variable. I didn't find this mistake until I extracted
          and tested my exact code to post here instead of the shortcut example
          I posted earlier.

          Sorry for the false alarm

          Art (slinking sheepishly off into the corner...)
        Your message has been successfully submitted and would be delivered to recipients shortly.