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

RE: [Clip] Re: Version problems

Expand Messages
  • John Shotsky
    Awesome information! Thanks! The GoTo s were copied from another clip that I used for reference, then I copied it myself every place I needed it. Heh, heh.
    Message 1 of 10 , Sep 7, 2009
    • 0 Attachment
      Awesome information! Thanks!

      The GoTo's were copied from another clip that I used for reference, then I copied it myself every place I needed it.
      Heh, heh.

      I'll have to spend some time looking at how the yield processing goes. The problem is that the word often shows up where
      its content is to be ignored. The \R is what prevented that. But perhaps it is not a problem - I'll have to run several
      of my reference files to see how that goes. I'll report back if a problem crops up.

      Again, thanks for the help!
      John

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of silvermoonwoman2001
      Sent: Monday, September 07, 2009 14:48
      To: ntb-clips@yahoogroups.com
      Subject: [Clip] Re: Version problems


      --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "John Shotsky" <jshotsky@...> wrote:
      >
      > Ok, tested, and all is well with both Pro and Light. The extra LF
      > is not a problem. I'm glad it is something that is correctable,
      > and of course, I learned something new, as usual. It's pretty
      > amazing that this only showed up as an error after a year of
      > development of the clip library!

      I posted another revision for you. You had another replacement in there involving only linefeeds (but as hex "\xa").

      There is no bareword "Goto". I removed them all. The basic syntax is, e.g.,

      ^!IfError Label4Yes Else Label4No

      But the main thing that was still causing differences between the versions is illustrated by the following clip.

      ^!Toolbar New Document
      ^!InsertText
      abc
      def
      ghi
      ^!Jump Doc_Start
      ^!Find ".+\R" RS
      ^!Jump Line_End
      ^!InsertText ^PYield

      First it finds content of a line including the linebreak. Then it uses the command ^!Jump Line_End. Then it Inserts
      text.

      In Pro, it inserts before the linebreak which was part of the find. In Light, it inserts after the linebreak that was
      part of the find.

      You used that type of processing alot, particularly in your Yields clip. It would better to be finding exactly what you
      want (and you really didn't want the "\R") and jumping to the end of the selection. You can even \K at the end of the
      pattern, and you don't even need a ^!Jump. But rather than try to rewrite what you had, I fixed the potential problems
      by inserting the command ^!Jump Line_Start before each of your ^!Jump Line_End's. When nothing is selected, the Line_End
      is at the same place in the document under both Light and Pro, and speed didn't seem much affected.

      ^!Toolbar New Document
      ^!InsertText
      abc
      def
      ghi
      ^!Jump Doc_Start
      ^!Find ".+\R" RS
      ^!Jump Line_Start
      ^!Jump Line_End
      ^!InsertText ^PYield

      So, especially if using ^$GetLine$, ^!Select Line, or Line_End, take care if you want your clips to be compatible.

      Regards,
      Sheri



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.