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

Re: [Clip] The QuickList Clip Assistant was driving me crazy!

Expand Messages
  • loro
    ... Gosh. It s the same in 4.95. Never noticed it. That shows I don t use the Clip Assistant often, but how odd that someone else hasn t noticed in all these
    Message 1 of 5 , Sep 8, 2010
      rogue_ronin wrote:
      >For years now, off and on, and I couldn't understand why nobody else
      >seemed to mention it. But I finally found a workaround.
      >
      >If you're not using it -- try setting the QuickList to Clip
      >Assistant and then double-click on StrReplace. Fill out the dialog,
      >or don't -- it won't matter.
      >
      >The text that gets inserted won't have a caret (^) in front of it,
      >making the function unusable.

      Gosh. It's the same in 4.95. Never noticed it. That shows I don't use
      the Clip Assistant often, but how odd that someone else hasn't
      noticed in all these years. Or have they?

      Lotta
    • Sheri
      ... I think the problem is the use of ^& in a top level clip. It causes the subsequent ^!InsertText commands to behave like ^!InsertSelect s. Since there are
      Message 2 of 5 , Sep 8, 2010
        On 9/8/2010 1:31 AM, rogue_ronin wrote:
        > Today, in avoiding other work, I copied the ClipHelp.clh file to ClipHelp.clb in my Library folder and added SetDebug ON to the StrReplace clip. On execution, I could clearly see that the caret was being selected! And when the following text was inserted, it would get eaten.
        >
        > What was causing this? I compared StrReplace to StrPos (another one that had the symptom) and StrROT13 (which didn't) and it seemed to me that it was the factor of having more than one clip wizard field. I played around a bit, and I tried removing the quote marks -- that did it! The caret was no longer selected and eaten. But the inserted text was no longer valid clipcode.
        >
        > So back in went the quote marks. I then tried commenting out the Clip ~Circonflex command and inserting the %CARET% variable into the InsertText command in the ~ParamFunction clip. Another success! This time the quotes were in the command, so it was valid.
        >
        > There are other clips with quotes in them, but not with more than one wizard field -- it's some interaction with the caret, the double function call, the multiple fields and the quote marks. I expect that bug will be very easy to track down.
        >
        > Er, not.

        I think the problem is the use of ^& in a top level clip. It causes the
        subsequent ^!InsertText commands to behave like ^!InsertSelect's. Since
        there are two follow-on ^!InsertText's, the second one ends up
        overwriting the first.

        If the StrReplace clip is called with ^!Clip or ^!FarClip (so it is not
        the top level clip), it seems to work as intended. So, e.g., it works
        fine in the Clipcode Syntax clip. It also works as intended if you
        remove ^& from the StrReplace clip. Preselected text will no longer be
        inserted as the proposed Search text. However, there are other Clip
        Assistant clips that use ^&. To be able to use all of them as top level
        clips, all the "Internal Use" clips in cliphelp.clh (~Circonflex,
        etc.) should probably be modified to put ^!Jump Select_End after each
        of the ^!InsertText commands.

        Regards,
        Sheri
      • rogue_ronin
        I primarily use the Clip Assistant as a Clip Editor Clipbook (slowly modifying it to suit myself.) I believe you wrote this: correct me if I m wrong? Why did
        Message 3 of 5 , Sep 8, 2010
          I primarily use the Clip Assistant as a Clip Editor Clipbook (slowly modifying it to suit myself.)

          I believe you wrote this: correct me if I'm wrong?

          Why did you use the double internal clip call? Not a criticism, just curious. I find that my own clips are marvelously dense and mysterious after just a short time away from them, even though I try to write decent comments for my older self. Is it primarily intended as a resource to feed the clipbook?

          I may do what you suggest, as I'm not familiar with all the entries in the Assistant -- just what I use, and now that I've had a few minutes to think about it, yours seems the simplest solution that resolves all the likely possibilities.

          Thanks!

          m a r


          > I think the problem is the use of ^& in a top level clip. It causes the
          > subsequent ^!InsertText commands to behave like ^!InsertSelect's. Since
          > there are two follow-on ^!InsertText's, the second one ends up
          > overwriting the first.
          >
          > If the StrReplace clip is called with ^!Clip or ^!FarClip (so it is not
          > the top level clip), it seems to work as intended. So, e.g., it works
          > fine in the Clipcode Syntax clip. It also works as intended if you
          > remove ^& from the StrReplace clip. Preselected text will no longer be
          > inserted as the proposed Search text. However, there are other Clip
          > Assistant clips that use ^&. To be able to use all of them as top level
          > clips, all the "Internal Use" clips in cliphelp.clh (~Circonflex,
          > etc.) should probably be modified to put ^!Jump Select_End after each
          > of the ^!InsertText commands.
          >
          > Regards,
          > Sheri
          >
        • Sheri
          ... Be sure to keep a backup if you customize the cliphelp.clh file. It gets overwritten when you reinstall or update NoteTab. ... No, but I added to it, and
          Message 4 of 5 , Sep 9, 2010
            On 9/8/2010 11:32 PM, rogue_ronin wrote:
            > I primarily use the Clip Assistant as a Clip Editor Clipbook (slowly modifying it to suit myself.)

            Be sure to keep a backup if you customize the cliphelp.clh file. It gets
            overwritten when you reinstall or update NoteTab.
            >
            > I believe you wrote this: correct me if I'm wrong?

            No, but I added to it, and my version, together with my ClipCode Syntax
            clip library and outline, is included with recent versions of NoteTab
            (since version 6).
            > Why did you use the double internal clip call? Not a criticism, just curious.

            Most of those internal clips are Eric's. I think the separate clip for
            inserting the caret is just to ensure that functions don't get evaluated
            before insertion. Seems like it could have been included in text
            insertions made by the other clips -- as ^%Caret%. Maybe the library
            predates that special variable.

            > I find that my own clips are marvelously dense and mysterious after just a short time away from them, even though I try to write decent comments for my older self. Is it primarily intended as a resource to feed the clipbook?

            Using the clipbook for launching clips is not allowed in ClipEdit (i.e.,
            when [Clips] is the active document). The Clip Assistant essentially
            gave a clipbook to ClipEdit. You can also launch clips from the clipbar
            during ClipEdit (except in NoteTab Light) but probably the clipbar came
            later.

            You might want to try the ClipCode Syntax clip. It helps you locate a
            clip function or command you need without rummaging through the Clip
            Assistant, and once found, runs the associated Clip Assistant clip.

            Have fun,
            Sheri
          Your message has been successfully submitted and would be delivered to recipients shortly.