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

Strange NewDoc paste prob

Expand Messages
  • Alan Williams
    Hi ntb-clips, I was translating some old basic sort routines into NTB and during testing came across this curious anomaly when creating a new document and
    Message 1 of 4 , Oct 16, 2000
      Hi ntb-clips,

      I was translating some old basic sort routines into NTB and during
      testing came across this curious anomaly when creating a new document
      and pasting to it.

      The clip depends on there being selected a series of numbers. It adds
      them to a variable, opens a new document, pastes the variable in and
      performs a Regex replace operation to change any delimiter to a ";".

      eg: numbers selected are:

      3 4 7 2 1 8 10 5 6

      First part of clip goes:

      ^!Set %st%=^$GetSelection$
      ^!Toolbar new document
      ^%st%
      ^!Toolbar Select All

      ^!Replace "\w" >> ";" TISHAR

      ^!SetArray %st%=^$GetSelection$... and sort follows...

      In that case the numbers are pasted with a tab in front and the
      replace operation produces this:

      ;;;3;4;7;2;1;8;10;5;6;

      If, however I do the Replace on the selected numbers without pasting
      to a new document I get this:

      3;4;7;2;1;8;10;5;6

      Which is, of course, what I want.

      This happens both in NoteTab Pro 482 and 483 Beta 4.

      Any ideas why this might be happening.



      Best regards,
      Alan
      mailto:alwilli@...
    • Jody
      Hi Alan, ... It worked fine for me in the doc itself or in a new doc. I don t suppose you are picking up the extra spaces from somewhere in your Clip or in
      Message 2 of 4 , Oct 17, 2000
        Hi Alan,

        >3 4 7 2 1 8 10 5 6
        >
        >First part of clip goes:
        >
        >^!Set %st%=^$GetSelection$
        >^!Toolbar new document
        >^%st%
        >^!Toolbar Select All
        >
        >^!Replace "\w" >> ";" TISHAR
        >
        >3;4;7;2;1;8;10;5;6

        It worked fine for me in the doc itself or in a new doc. I don't
        suppose you are picking up the extra spaces from somewhere in
        your Clip or in the doc, eh?

        Happy Clip'n!
        Jody

        http://www.sureword.com/notetab

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/group/ntb-clips
      • Alan Williams
        Hi Jody, ... Well, I hope not, the fact that the Replace works on the original selection hopefully shows there are no anomalies up to then. When the variable
        Message 3 of 4 , Oct 19, 2000
          Hi Jody,
          Tuesday, 17 October, 2000, you wrote:
          >>3 4 7 2 1 8 10 5 6
          >>
          >>First part of clip goes:
          >>
          >>^!Set %st%=^$GetSelection$
          >>^!Toolbar new document
          >>^%st%
          >>^!Toolbar Select All
          >>
          >>^!Replace "\w" >> ";" TISHAR
          >>
          >>3;4;7;2;1;8;10;5;6

          > It worked fine for me in the doc itself or in a new doc. I don't
          > suppose you are picking up the extra spaces from somewhere in
          > your Clip or in the doc, eh?

          Well, I hope not, the fact that the Replace works on the original
          selection hopefully shows there are no anomalies up to then.

          When the variable is pasted back to a new doc, it picks up the extra
          tab in front and a space at the tail, according resulting in a ; at
          the very end.

          I'll have to try a few variations and see what happens.

          Thanks

          Best regards,
          Alan

          mailto:alwilli@...
        • Jody
          Hi Alan, ... That would be the reason the as I mentioned the other day. With no leading or trailing spaces it worked just fine. Happy Clip n! Jody
          Message 4 of 4 , Oct 19, 2000
            Hi Alan,

            > 3 4 7 2 1 8 10 5 6

            >Well, I hope not, the fact that the Replace works on the original
            >selection hopefully shows there are no anomalies up to then.
            >
            >When the variable is pasted back to a new doc, it picks up the extra
            >tab in front and a space at the tail, according resulting in a ; at
            >the very end.

            That would be the reason the as I mentioned the other day. With
            no leading or trailing spaces it worked just fine.

            Happy Clip'n!
            Jody

            http://www.sureword.com/notetab

            Subscribe, UnSubscribe, Options
            mailto:Ntb-Clips-Subscribe@...
            mailto:Ntb-Clips-UnSubscribe@...
            http://www.egroups.com/group/ntb-clips
          Your message has been successfully submitted and would be delivered to recipients shortly.