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

Re: [Clip] A problem with SetDocIndex

Expand Messages
  • Larry Thomas
    Hi Magnus, ... Try placing a ^!Delay 10 or a ^!Delay 20 just after the line with ^!MENU File/New Regards, Larry lrt@nospam-please.net e¿ê
    Message 1 of 23 , Dec 19, 2003
    • 0 Attachment
      Hi Magnus,

      At 03:28 PM 12/19/03 +0100, you wrote:
      >Hi.
      >
      >I have a peculiar problem with the ^!SetDocIndex command. My clip is
      >supposed to make a new document based on information in an existing one, so
      >I have to toggle back and fourth.
      >
      >The relevant parts of my clip look like this
      >
      >^!Set %oldindex%=^$GetDocIndex$
      >.
      >.
      >^!MENU File/New
      >^!Set %newindex%=^$GetDocIndex$
      >.
      >.
      >^!SetDocIndex ^%oldindex%
      >.
      >.
      > ^!SetDocIndex ^%newindex%
      >
      >The jump back to the original document works fine. However, when the last
      >SetDocIndex command is executed, nothing happens. The focus stays on the
      >“old” tab. I’ve run it in debug mode and the command seems perfectly OK.
      >
      >The really strange thing is that if I replace ^%newindex% with the correct
      >number in the script (e.g. ^!SetDocIndex 12), it works. The commands are
      >identical in the debug message boxes.
      >
      >Do anybody have an idea what may be going on? I use Windows 2000 and NoteTab
      >Pro 4.95
      >
      >Magnus

      Try placing a ^!Delay 10 or a ^!Delay 20 just after the line with ^!MENU
      File/New

      Regards,

      Larry
      lrt@... e¿ê
    • Larry Thomas
      Hi Magnus, ... I looked at this again. Is the last line a typo???? There is a space in front of it. The space will cause it to fail. You should know that a
      Message 2 of 23 , Dec 19, 2003
      • 0 Attachment
        Hi Magnus,

        At 03:28 PM 12/19/03 +0100, you wrote:
        >Hi.
        >
        >I have a peculiar problem with the ^!SetDocIndex command. My clip is
        >supposed to make a new document based on information in an existing one, so
        >I have to toggle back and fourth.
        >
        >The relevant parts of my clip look like this
        >
        >^!Set %oldindex%=^$GetDocIndex$
        >.
        >.
        >^!MENU File/New
        >^!Set %newindex%=^$GetDocIndex$
        >.
        >.
        >^!SetDocIndex ^%oldindex%
        >.
        >.
        > ^!SetDocIndex ^%newindex%

        I looked at this again. Is the last line a typo???? There is a space in
        front of it. The space will cause it to fail. You should know that a
        trailing space will also cause this clip to fail. Go to your clip and
        press Shift+F12 to display non-printing characters and then see if there is
        a space at the end of the line:

        ^!SetDocIndex ^%newindex%

        If there is get rid of it and your clip should run ok. This is a big
        problem with a lot of clips. To avoid this problem, you can go to the menu
        bar and select View/Options and then select the "Documents" tab and check
        the box on the top left side of the panel labeled "Trim White Spaces".
        This will insure that every time you save a file or a clip, any white
        spaces left at the end of a paragraph/line will be removed.

        Regards,

        Larry
        lrt@... e¿ê
      • Magnus H. Sørby
        Hi Larry and hrs, Thanks for your suggestions. Unfortunately, none of them solved the problem. The space in front of the command was introduced in the email.
        Message 3 of 23 , Dec 22, 2003
        • 0 Attachment
          Hi Larry and hrs,



          Thanks for your suggestions. Unfortunately, none of them solved the problem.
          The space in front of the command was introduced in the email. There are no
          leading or trailing spaces in the clip. I’ve tried to save with “Trim with
          blacks” as suggested to be sure. I’ve also tried to place ^!Delay 20 several
          places without any success.



          The problem is definitely not an incorrect value of %newindex%. The correct
          value is confirmed by running in debug mode and ^!Info.



          Again, the really strange thing is that replacing the %newindex% variable
          with the correct number, solves the problem:



          ^!Delay 20

          ^!SetDocIndex ^%newindex%

          ; Nothing happens. The value on newindex is 13 according to the debug
          window.

          ^!SetDocIndex ^%newindex%

          ; Nothing happens. The value on newindex is 13.

          ^!SetDocIndex 13

          ; Focus is moved to the new document.




          Magnus
          -----Opprinnelig melding-----
          Fra: Larry Thomas [mailto:larryt@...]
          Sendt: 20. desember 2003 02:17
          Til: ntb-clips@yahoogroups.com
          Emne: Re: [Clip] A problem with SetDocIndex



          Hi Magnus,

          At 03:28 PM 12/19/03 +0100, you wrote:
          >Hi.
          >
          >I have a peculiar problem with the ^!SetDocIndex command. My clip is
          >supposed to make a new document based on information in an existing one,
          so
          >I have to toggle back and fourth.
          >
          >The relevant parts of my clip look like this
          >
          >^!Set %oldindex%=^$GetDocIndex$
          >.
          >.
          >^!MENU File/New
          >^!Set %newindex%=^$GetDocIndex$
          >.
          >.
          >^!SetDocIndex ^%oldindex%
          >.
          >.
          > ^!SetDocIndex ^%newindex%

          I looked at this again. Is the last line a typo???? There is a space in
          front of it. The space will cause it to fail. You should know that a
          trailing space will also cause this clip to fail. Go to your clip and
          press Shift+F12 to display non-printing characters and then see if there
          is
          a space at the end of the line:

          ^!SetDocIndex ^%newindex%

          If there is get rid of it and your clip should run ok. This is a big
          problem with a lot of clips. To avoid this problem, you can go to the
          menu
          bar and select View/Options and then select the "Documents" tab and check
          the box on the top left side of the panel labeled "Trim White Spaces".
          This will insure that every time you save a file or a clip, any white
          spaces left at the end of a paragraph/line will be removed.

          Regards,

          Larry
          lrt@... e¿ê


          Yahoo! Groups Sponsor
          ADVERTISEMENT





          ----------------------------------------------------------------------------
          --
          Yahoo! Groups Links

          a.. To visit your group on the web, go to:
          http://groups.yahoo.com/group/ntb-clips/

          b.. To unsubscribe from this group, send an email to:
          ntb-clips-unsubscribe@yahoogroups.com

          c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



          [Non-text portions of this message have been removed]
        • Jody
          Hi Magnus, Larry... Others, ... Without seeing the in between stuff it is hard to tell exactly. The following seems to be getting set correctly to me. The
          Message 4 of 23 , Dec 22, 2003
          • 0 Attachment
            Hi Magnus, Larry... Others,

            >There are no leading or trailing spaces in the clip. I�ve tried
            >to save with �Trim with blacks� as suggested to be sure. I�ve
            >also tried to place ^!Delay 20 several places without any success.

            Without seeing the in between stuff it is hard to tell exactly.

            The following seems to be getting set correctly to me. The second
            Clip is the same, but with the ^!Info ;commented out in case of a
            timing issue, but you can see that it will end up on the
            index/tab it started on and the new document made.

            <--- Copy below this line --->
            H=SetDocIndex1
            ; eMailed on 12-22-2003, ntb-clips@yahoogroups.com, Jody
            ; notetab.net, clean-funnies.com, fookes.us, sojourner.us

            ^!Set %CurrentIndex%=^$GetDocIndex$
            ^!Info %CurrentIndex% = ^%CurrentIndex%
            ^!MENU File/New
            ^!Set %NewIndex%=^$GetDocIndex$
            ^!SetDocIndex ^%CurrentIndex%
            ^!Info Check1 %CurrentIndex% = ^%CurrentIndex%
            ^!SetDocIndex ^%NewIndex%
            ^!Info Check2 %NewIndex% = ^%NewIndex%
            ^!SetDocIndex ^%CurrentIndex%
            ^!Info Check2 %CurrentIndex% = ^%CurrentIndex%

            H=SetDocIndex2
            ; eMailed on 12-22-2003, ntb-clips@yahoogroups.com, Jody
            ; notetab.net, clean-funnies.com, fookes.us, sojourner.us

            ^!Set %CurrentIndex%=^$GetDocIndex$
            ; ^!Info %CurrentIndex% = ^%CurrentIndex%
            ^!MENU File/New
            ^!Set %NewIndex%=^$GetDocIndex$
            ^!SetDocIndex ^%CurrentIndex%
            ; ^!Info Check1 %CurrentIndex% = ^%CurrentIndex%
            ^!SetDocIndex ^%NewIndex%
            ; ^!Info Check2 %NewIndex% = ^%NewIndex%
            ^!SetDocIndex ^%CurrentIndex%
            ; ^!Info Check2 %CurrentIndex% = ^%CurrentIndex%

            <--- Copy above this line --->
            <--- Right click over a Library --->
            <--- Choose: Add from Clipboard --->

            Happy Clip'n!
            Jody

            www.clean-funnies.com, http://www.fookes.us/maillist.htm

            Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
            UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
            Options: http://groups.yahoo.com/group/ntb-clips
          • hsavage
            ... problem. ... correct ... Magnus, I have 4 minor suggestions, if first doesn t help, move to next. • Check to ensure there are no lines with
            Message 5 of 23 , Dec 22, 2003
            • 0 Attachment
              Magnus H. Sørby wrote:

              > Hi Larry and hrs,
              >
              > Thanks for your suggestions. Unfortunately, none of them solved the
              problem.
              >
              > The problem is definitely not an incorrect value of %newindex%. The
              correct
              > value is confirmed by running in debug mode and ^!Info.
              >
              > Again, the really strange thing is that replacing the %newindex% variable
              > with the correct number, solves the problem:
              >
              >
              > Magnus

              Magnus,

              I have 4 minor suggestions, if first doesn't help, move to next.

              • Check to ensure there are no lines with "un-intentional" trailing
              spaces in this clip, or any clipbook, for that matter. Select all, use
              Menu/Modify/Lines/Trim Blanks.

              • Close NTP, in a file manager, check the files in the main NTB and
              subfolders. None, IMO, should have a read-only attribute especially
              NotePro.ini.

              • Open NotePro.ini in NTP for editing, insert an exclamation mark as the
              first character and do a 'Save As' !NotePro.ini. Shutdown, restart
              NoteTab and check.

              • Close NTP, in a file manager, rename NotePro.ini to NotePro-1.ini, any
              variation will do, shut down NotePro, this process will build a
              completely new INI file, restart and check. If it doesn't help go back
              to original INI.

              hrs
            • Magnus H. Sørby
              Thanks again for the suggestions, but still no solution. The whole clip is pasted below for those interested. The lines that are commented out have been used
              Message 6 of 23 , Dec 23, 2003
              • 0 Attachment
                Thanks again for the suggestions, but still no solution. The whole clip is
                pasted below for those interested. The lines that are commented out have
                been used for testing. The clip is meant to work on a data file with a very
                specific format. If somebody want such a file, please let me know and I'll
                mail it.

                Marry christmast to all!

                Magnus

                ^!Jump DOC_START
                ^!Set %oldindex%=^$GetDocIndex$
                ^!Jump 3
                ^!Select LINE
                ^!Set %tittel%=^$GetSelection$
                ^!Jump 8
                ^!Keyboard CTRL+RIGHT
                ^!Set %antall_linjer%=^$GetBlock$
                ^!Set %header%= 1 ^%antall_linjer% 1.55540 1.55540 -0.00545
                0.00000 0.00000 0 ^%NL% 0 0 0 ^%NL% 2Theta Yobs Ycal
                Yobs-Ycal Backg Posr (hkl) K ^%NL%
                ^!MENU File/New
                ;^!Delay 20
                ^!Set %newindex%=^$GetDocIndex$
                ^%tittel%^%header%
                ^!SetDocIndex ^%oldindex%
                ^!Jump 9
                :new_line
                ^!Find "."
                ^!IfError EXIT
                ^!Set %Q%=^$GetBlock$
                ^!Find "."
                ^!Set %Fexp%=^$GetBlock$
                ^!Find "."
                ^!Set %Fcalc%=^$GetBlock$
                ^!Find "."
                ^!Set %diffuse%=^$GetBlock$
                ^!Set %Q%=^$Calc(^%Q%;4)$
                ^!Set %Iexp%=^$Calc(^%Fexp%*5000;1)$
                ^!Set %Icalc%=^$Calc(^%Fcalc%*5000;1)$
                ^!Set %diff%=^$Calc((^%Iexp%-^%Icalc%)-2000;1)$
                ^!Set %diffuse%=^$Calc(^%diffuse%;1)$
                ^!Keyboard RIGHT LEFT
                ;^!SetDebug On
                ;^!Delay 20
                ;^!Info OLD ^%oldindex% --- NEW ^%newindex%
                ;^!Delay 20
                ^!SetDocIndex ^%newindex%
                ;^!SetDocIndex 15
                ^%Q%^%TAB% ^%Iexp%^%TAB% ^%Icalc%^%TAB% ^%diff%^%TAB%
                ^%diffuse%^%NL%
                ^!SetDocIndex ^%oldindex%
                ^!Goto new_line
              • Sheri
                Which NoteTab variant and version are you using? And which OS and language? My suggestion would be, to create and save new clip library with your clip plus a
                Message 7 of 23 , Dec 23, 2003
                • 0 Attachment
                  Which NoteTab variant and version are you using? And which OS and
                  language?

                  My suggestion would be, to create and save new clip library with
                  your clip plus a second clip with your document data in it (no clip
                  instructions, just the text of the data file within a named clip -
                  when executed it would type out your data.). After verifying that
                  the 1st clip is still not behaving as you expect, you could zip the
                  new clb library and post it in our Yahoo files area. That way, when
                  someone downloads and tries your clip (hopefully with a similar
                  environment to yours) you will know he or she has the same spaces,
                  characters, etc. and document data, that fails for you. As is, with
                  the broken lines and other changes generated by email, we can't be
                  sure it is the same. Once the issue is resolved, you could remove it
                  from the group's Yahoo files area.

                  Regards,
                  Sheri
                • Sheri
                  ... the menu ... and check ... Spaces . ... white ... Another issue that recently came up (on the NoteTab Scripts List) was the unexpected appearance in a clip
                  Message 8 of 23 , Dec 24, 2003
                  • 0 Attachment
                    --- In ntb-clips@yahoogroups.com, Larry Thomas <larryt@c...> wrote:
                    >
                    > This is a big
                    > problem with a lot of clips. To avoid this problem, you can go to
                    the menu
                    > bar and select View/Options and then select the "Documents" tab
                    and check
                    > the box on the top left side of the panel labeled "Trim White
                    Spaces".
                    > This will insure that every time you save a file or a clip, any
                    white
                    > spaces left at the end of a paragraph/line will be removed.
                    >

                    Another issue that recently came up (on the NoteTab Scripts List)
                    was the unexpected appearance in a clip of a nonbreaking space
                    (character 160) masquerading as a space! Possibly this character got
                    into the clip via a copy/paste operation from Yahoo, where the
                    user's Yahoo preference was to display messages as html. Even with
                    non-printing characters displayed in NTP, it was hard to spot
                    (looked like a pure space instead of a little dot). Of course in
                    NoteTab Light, it is not possible to display non-printing
                    characters, so there is no visual distinction at all.

                    Such a character can be found or replaced using NoteTab's
                    Find/Replace dialogs and creating the character by pressing and
                    holding Alt while typing 0160

                    It could also be found or replaced via a clip, but a clip is not
                    easily used during clip-edit in NoteTab Light. As a workaround, the
                    library could be opened as edited as a document. Here is a clip
                    command that would replace all non-breaking spaces with real spaces.

                    ^!Replace "^$DecToChar(160)$" >> "^%Space%" AWS

                    Regards,
                    Sheri
                  • Magnus H. Sørby
                    As Sheri suggested, a library containing clip and data file is now put on the Yahoo file area. The file is called SetDocIndex.zip. The problem occurs in the
                    Message 9 of 23 , Jan 5, 2004
                    • 0 Attachment
                      As Sheri suggested, a library containing clip and data file is now put on
                      the Yahoo file area. The file is called SetDocIndex.zip. The problem occurs
                      in the 36th line of the clip.

                      Again, I use NoteTab Pro 4.95 and Windows 2000 (Norwegian version).

                      Regards,
                      Magnus

                      -----Opprinnelig melding-----
                      Fra: Sheri [mailto:silvermoonwoman@...]
                      Sendt: 23. desember 2003 15:17
                      Til: ntb-clips@yahoogroups.com
                      Emne: Re: [Clip] A problem with SetDocIndex


                      Which NoteTab variant and version are you using? And which OS and
                      language?

                      My suggestion would be, to create and save new clip library with
                      your clip plus a second clip with your document data in it (no clip
                      instructions, just the text of the data file within a named clip -
                      when executed it would type out your data.). After verifying that
                      the 1st clip is still not behaving as you expect, you could zip the
                      new clb library and post it in our Yahoo files area. That way, when
                      someone downloads and tries your clip (hopefully with a similar
                      environment to yours) you will know he or she has the same spaces,
                      characters, etc. and document data, that fails for you. As is, with
                      the broken lines and other changes generated by email, we can't be
                      sure it is the same. Once the issue is resolved, you could remove it
                      from the group's Yahoo files area.

                      Regards,
                      Sheri


                      Yahoo! Groups Sponsor
                      ADVERTISEMENT





                      ----------------------------------------------------------------------------
                      --
                      Yahoo! Groups Links

                      a.. To visit your group on the web, go to:
                      http://groups.yahoo.com/group/ntb-clips/

                      b.. To unsubscribe from this group, send an email to:
                      ntb-clips-unsubscribe@yahoogroups.com

                      c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                      [Non-text portions of this message have been removed]
                    • Jody
                      Hi Magnus, It still works just fine for me in Pro 4.95 XP Pro. That is if you are talking about the SetDocIndex still (see my remarks about line 36). When and
                      Message 10 of 23 , Jan 5, 2004
                      • 0 Attachment
                        Hi Magnus,

                        It still works just fine for me in Pro 4.95 XP Pro. That is if
                        you are talking about the SetDocIndex still (see my remarks about
                        line 36). When and if you get it working I suggest you add the
                        following two lines to the top of the Clip to speed it up:

                        ^!SetHintInfo Working...
                        ^!SetScreenUpdate Off
                        ; Sometimes it helps to:
                        ^!MinimizeApp
                        ; and at the end of the script
                        ^!ActivateApp

                        >As Sheri suggested, a library containing clip and data file is now put on
                        >the Yahoo file area. The file is called SetDocIndex.zip. The problem occurs
                        >in the 36th line of the clip.

                        My line 36 is either one of these depending on whether you have
                        Show Headers on or not (right click over the Library).

                        ^!Set %diffuse%=^$Calc(^%diffuse%;1)$
                        ^!Keyboard RIGHT LEFT

                        What does your ^!Keyboard do? Unselect? That might be where your
                        glitch is coming from. Try ^!Jump Select_Start or ^!Jump Select_End.
                        Or I think ^!Select 0 (zero) will do it, it's been awhile. <g>

                        >Again, I use NoteTab Pro 4.95 and Windows 2000 (Norwegian version).
                        >
                        >Regards,
                        >Magnus
                        >
                        > -----Opprinnelig melding-----
                        > Fra: Sheri [mailto:silvermoonwoman@...]
                        > Sendt: 23. desember 2003 15:17
                        > Til: ntb-clips@yahoogroups.com
                        > Emne: Re: [Clip] A problem with SetDocIndex
                        >
                        >
                        > Which NoteTab variant and version are you using? And which OS and
                        > language?


                        Happy Clip'n!
                        Jody

                        www.clean-funnies.com, http://www.fookes.us/maillist.htm

                        Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                        UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                        Options: http://groups.yahoo.com/group/ntb-clips
                      • Magnus H. Sorby
                        Hi Jody, My problem line is ^!SetDocIndex ^%newindex% (line 36 with no Word Wrap and no header). The ^Keyboard command is for unselecting. I ve replaced it
                        Message 11 of 23 , Jan 5, 2004
                        • 0 Attachment
                          Hi Jody,

                          My problem line is
                          ^!SetDocIndex ^%newindex%
                          (line 36 with no Word Wrap and no header).

                          The ^Keyboard command is for unselecting. I've replaced it with ^Jump
                          Select_End without any change of behaviour.

                          Well then, I guess the problem is in my computer. I will work around the
                          problem by replacing ^%newindex% with the proper number.

                          I've tried all the posted suggestions but none of them helped. Thanks
                          anyway!

                          Magnus
                          -----Opprinnelig melding-----
                          Fra: Jody [mailto:kjv-av1611@...]
                          Sendt: 5. januar 2004 11:29
                          Til: ntb-clips@yahoogroups.com
                          Emne: Re: [Clip] A problem with SetDocIndex


                          Hi Magnus,

                          It still works just fine for me in Pro 4.95 XP Pro. That is if
                          you are talking about the SetDocIndex still (see my remarks about
                          line 36). When and if you get it working I suggest you add the
                          following two lines to the top of the Clip to speed it up:

                          ^!SetHintInfo Working...
                          ^!SetScreenUpdate Off
                          ; Sometimes it helps to:
                          ^!MinimizeApp
                          ; and at the end of the script
                          ^!ActivateApp

                          >As Sheri suggested, a library containing clip and data file is now put on
                          >the Yahoo file area. The file is called SetDocIndex.zip. The problem
                          occurs
                          >in the 36th line of the clip.

                          My line 36 is either one of these depending on whether you have
                          Show Headers on or not (right click over the Library).

                          ^!Set %diffuse%=^$Calc(^%diffuse%;1)$
                          ^!Keyboard RIGHT LEFT

                          What does your ^!Keyboard do? Unselect? That might be where your
                          glitch is coming from. Try ^!Jump Select_Start or ^!Jump Select_End.
                          Or I think ^!Select 0 (zero) will do it, it's been awhile. <g>

                          >Again, I use NoteTab Pro 4.95 and Windows 2000 (Norwegian version).
                          >
                          >Regards,
                          >Magnus
                          >
                          > -----Opprinnelig melding-----
                          > Fra: Sheri [mailto:silvermoonwoman@...]
                          > Sendt: 23. desember 2003 15:17
                          > Til: ntb-clips@yahoogroups.com
                          > Emne: Re: [Clip] A problem with SetDocIndex
                          >
                          >
                          > Which NoteTab variant and version are you using? And which OS and
                          > language?


                          Happy Clip'n!
                          Jody

                          www.clean-funnies.com, http://www.fookes.us/maillist.htm

                          Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                          UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                          Options: http://groups.yahoo.com/group/ntb-clips


                          Yahoo! Groups Sponsor
                          ADVERTISEMENT





                          ----------------------------------------------------------------------------
                          --
                          Yahoo! Groups Links

                          a.. To visit your group on the web, go to:
                          http://groups.yahoo.com/group/ntb-clips/

                          b.. To unsubscribe from this group, send an email to:
                          ntb-clips-unsubscribe@yahoogroups.com

                          c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                          [Non-text portions of this message have been removed]
                        • Sheri
                          ... Whoa! Hold on there It does not work here. The problem you have with ^!SetDocIndex is on line 13 of your clip: ^!Set %newindex%=^$GetDocIndex$ There is
                          Message 12 of 23 , Jan 5, 2004
                          • 0 Attachment
                            At 01:40 PM 1/5/2004 +0100, you wrote:
                            >Well then, I guess the problem is in my computer. I will work around the
                            >problem by replacing ^%newindex% with the proper number.

                            Whoa! Hold on there <g>

                            It does not work here.

                            The problem you have with ^!SetDocIndex is on line 13 of your clip:

                            ^!Set %newindex%=^$GetDocIndex$

                            There is a space after ^$GetDocIndex$

                            Regards,
                            Sheri
                          • Magnus H. Sorby
                            Thanks Sheri. I m really sorry to have bothered you all with this! The importance of removing leading and trailing spaces was pointed out by Larry the day
                            Message 13 of 23 , Jan 5, 2004
                            • 0 Attachment
                              Thanks Sheri.

                              I'm really sorry to have bothered you all with this! The importance of
                              removing leading and trailing spaces was pointed out by Larry the day after
                              I first posted my problem. I was absolutely sure that I had checked it and
                              also used "Trim Blanks". I obviously hadn't.

                              Regards,
                              Magnus
                              -----Opprinnelig melding-----
                              Fra: Sheri [mailto:silvermoonwoman@...]
                              Sendt: 5. januar 2004 14:12
                              Til: ntb-clips@yahoogroups.com
                              Emne: Re: SV: [Clip] A problem with SetDocIndex


                              At 01:40 PM 1/5/2004 +0100, you wrote:
                              >Well then, I guess the problem is in my computer. I will work around the
                              >problem by replacing ^%newindex% with the proper number.

                              Whoa! Hold on there <g>

                              It does not work here.

                              The problem you have with ^!SetDocIndex is on line 13 of your clip:

                              ^!Set %newindex%=^$GetDocIndex$

                              There is a space after ^$GetDocIndex$

                              Regards,
                              Sheri



                              Yahoo! Groups Sponsor
                              ADVERTISEMENT





                              ----------------------------------------------------------------------------
                              --
                              Yahoo! Groups Links

                              a.. To visit your group on the web, go to:
                              http://groups.yahoo.com/group/ntb-clips/

                              b.. To unsubscribe from this group, send an email to:
                              ntb-clips-unsubscribe@yahoogroups.com

                              c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                              [Non-text portions of this message have been removed]
                            • Jody
                              Hi Sheri and Magnus, ... Good find Sheri, (even though you sent my eMail to your trash box awhile back.) Definitely agreed; I just said it worked fine
                              Message 14 of 23 , Jan 5, 2004
                              • 0 Attachment
                                Hi Sheri and Magnus,

                                >> Well then, I guess the problem is in my computer. I will work
                                >> around the problem by replacing ^%newindex% with the proper
                                >> number.
                                >
                                >Whoa! Hold on there <g>

                                Good find Sheri, (even though you sent my eMail to your trash box
                                awhile back.) <g>

                                Definitely agreed; I just said it worked fine here. <g> Magnus,
                                You must have missed one of the first few posts mentioning for
                                you to check for spaces at the end of the lines. The reason why a
                                lot of us miss that in actual testing is because we have the
                                setting in Options | Documents | Trim White Spaces checked. It
                                does the following:

                                Trim White Spaces: Spaces at the end of paragraphs are removed
                                when the document is saved.

                                So, when we get Clips or make them, every time they are saved,
                                the trailing white spaces (just a regular <space>) at the end of
                                the lines are removed. The only time that will cause you a
                                problem with Clips is if you really want a space at the end. All
                                you need to remember then is if you want the space (or more)
                                there you add the preset variable ^%Space%, one for every space
                                you want. (The setting also effects regular document line endings.)

                                FWIW, you could have just posted your Clip on the list. :)
                                Somebody might have spotted it sooner like that probably saving
                                you a lot of headaches. The data wasn't really necessary to start
                                with, that is, to just take a quick look at the Clip. Later
                                somebody might have requested you send a few lines of the data
                                file to the list. Anyway, your Clip will run a lot faster if you
                                add the couple lines to the top like I mentioned. Good luck!

                                >It does not work here.
                                >
                                >The problem you have with ^!SetDocIndex is on line 13 of your clip:
                                >
                                >^!Set %newindex%=^$GetDocIndex$
                                >
                                >There is a space after ^$GetDocIndex$


                                Happy Clip'n!
                                Jody

                                www.clean-funnies.com, http://www.fookes.us/maillist.htm

                                Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                                UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                                Options: http://groups.yahoo.com/group/ntb-clips
                              • Sheri
                                ... Hi Mangus, We ve all been there, so don t let it trouble you. One of the advantages of NoteTab Pro over the other variants is the ability to turn on
                                Message 15 of 23 , Jan 5, 2004
                                • 0 Attachment
                                  At 02:49 PM 1/5/2004 +0100, you wrote:
                                  >Thanks Sheri.
                                  >
                                  >I'm really sorry to have bothered you all with this! The importance of
                                  >removing leading and trailing spaces was pointed out by Larry the day after
                                  >I first posted my problem. I was absolutely sure that I had checked it and
                                  >also used "Trim Blanks". I obviously hadn't.
                                  >
                                  >Regards,
                                  >Magnus


                                  Hi Mangus,

                                  We've all been there, so don't let it trouble you. One of the advantages of NoteTab Pro over the other variants is the ability to turn "on" non-printing spaces, which in most cases makes things like that stand out. You can enable it on the View tab in Options (Show Nonprinting Text).

                                  I will make a couple of suggestions about your clip. Since the only reason you are bouncing back and forth between documents is to add text from variables, I think it would be faster and more efficient to use ^!AppendtoFile. Whatever file name you choose, you could Close that file and delete it (if it exists) at the beginning of your clip, and Open it for viewing at the end of your clip. Also, you will find that there are clip instructions that will allow you to move the cursor anywhere you want it in your document without using ^!Keyboard commands. Although the ^!Keyboard commands may seem convenient, they are subject to focus and timing issues that can sometimes cause unexpected results.

                                  Have fun,
                                  Sheri
                                • Sheri
                                  Hi Jody, ... I m innocent, my computer did it all by itself. ... I have just recently installed NTP on XP, and had not changed the default setting so
                                  Message 16 of 23 , Jan 5, 2004
                                  • 0 Attachment
                                    Hi Jody,

                                    At 08:01 AM 1/5/2004 -0600, you wrote:

                                    >Good find Sheri, (even though you sent my eMail to your trash box
                                    >awhile back.) <g>

                                    I'm innocent, my computer did it all by itself. <BG>


                                    >So, when we get Clips or make them, every time they are saved,
                                    >the trailing white spaces (just a regular <space>) at the end of
                                    >the lines are removed. The only time that will cause you a
                                    >problem with Clips is if you really want a space at the end. All
                                    >you need to remember then is if you want the space (or more)
                                    >there you add the preset variable ^%Space%, one for every space
                                    >you want. (The setting also effects regular document line endings.)

                                    I have just recently installed NTP on XP, and had not changed the default setting so trailing blanks were not being trimmed.

                                    However, having now enabled it (in NTP 4.95), and after deleting and reloading Mangus's clip library a few times, I think trimming blanks must apply only to documents and not to clip libraries (unless you happen to open the clip library as if it were a document, re-save it and reload it). I made another change to his library (in Clip Edit), saved the clip, closed and reopened NTP, and the space was still there.

                                    Regards,
                                    Sheri
                                  • Jody
                                    Hi Sheri, ... Yeah, I ve heard that one before... ... It appears to be broke in the Clip Editor... Maybe it has been like that for a long time. I downloaded
                                    Message 17 of 23 , Jan 5, 2004
                                    • 0 Attachment
                                      Hi Sheri,

                                      >>Good find Sheri, (even though you sent my eMail to your trash box
                                      >>awhile back.) <g>
                                      >
                                      >I'm innocent, my computer did it all by itself. <BG>

                                      Yeah, I've heard that one before...

                                      >I have just recently installed NTP on XP, and had not changed the
                                      >default setting so trailing blanks were not being trimmed.
                                      >
                                      >However, having now enabled it (in NTP 4.95), and after deleting
                                      >and reloading Mangus's clip library a few times, I think trimming
                                      >blanks must apply only to documents and not to clip libraries
                                      >(unless you happen to open the clip library as if it were a
                                      >document, re-save it and reload it). I made another change to his
                                      >library (in Clip Edit), saved the clip, closed and reopened NTP,
                                      >and the space was still there.

                                      It appears to be broke in the Clip Editor... Maybe it has been
                                      like that for a long time. I downloaded the zip, double clicked
                                      on in zip prog since clb is associated with NoteTab, saved to
                                      Library, :), and did a List Update to get it on my Libraries bar.
                                      Obviously, it was when I had it open as a document and saved it
                                      that the space was removed. I do know for sure though (at least I
                                      think I do;) that they use to be trimmed in the Clip Editor - not
                                      visible at the time though. Switch in/out of the Library and it
                                      will trim it, at least it just did here.

                                      See ya in the funnies,
                                      Jody Adair, Prov. 15:15

                                      Blessed are they who can laugh at themselves
                                      for they shall never cease to be amused.
                                      http://www.clean-funnies.com
                                    • Sheri
                                      Hi Jody, ... Any idea how you did it? I m assuming you mean you did it without loading and saving it as if it was a document first (as happened when you
                                      Message 18 of 23 , Jan 5, 2004
                                      • 0 Attachment
                                        Hi Jody,

                                        At 09:33 AM 1/5/2004 -0600, you wrote:
                                        >Switch in/out of the Library and it
                                        >will trim it, at least it just did here.

                                        Any idea how you did it? I'm assuming you mean you did it without loading and saving it as if it was a document first (as happened when you initially loaded the clb file from the zip and re-saved it).

                                        I tried, but wasn't able to make that happen here. After making a change to his library, I switched libraries and was prompted "Save Changes to Clipbook Library SetDocIndex?"

                                        Clicked Yes. Switched back to his library and the space was still there. Just to make sure it wasn't because the library was resident, I then closed and reopened NTP. It was still there.

                                        Regards,
                                        Sheri
                                      • Jody
                                        Hi Sheri, Are you double sure you have Document | Trim White Spaces checked? Here s another way. Open Clip Editor. Add a space to the end of a line. Save,
                                        Message 19 of 23 , Jan 5, 2004
                                        • 0 Attachment
                                          Hi Sheri,

                                          Are you double sure you have Document | Trim White Spaces checked?

                                          Here's another way. Open Clip Editor. Add a space to the end of a
                                          line. Save, click on another Clip and then back on the original.
                                          Space removed with Clip Editor still open.

                                          >> Switch in/out of the Library and it will trim it, at least it
                                          >> just did here.
                                          >
                                          >Any idea how you did it? I'm assuming you mean you did it without
                                          >loading and saving it as if it was a document first (as happened
                                          >when you initially loaded the clb file from the zip and re-saved
                                          >it).


                                          Happy Clip'n!
                                          Jody

                                          www.clean-funnies.com, http://www.fookes.us/maillist.htm

                                          Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                                          UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                                          Options: http://groups.yahoo.com/group/ntb-clips
                                        • Sheri
                                          Hi Jody, Apparently its not enough to set Trim White Spaces in View|Options|Documents. With the [Clips] document open, I needed to use Document|Properties,
                                          Message 20 of 23 , Jan 5, 2004
                                          • 0 Attachment
                                            Hi Jody,

                                            Apparently its not enough to set Trim White Spaces in View|Options|Documents. With the [Clips] document open, I needed to use Document|Properties, i.e., to select Use Default Settings!

                                            Regards,
                                            Sheri
                                          • Jody
                                            Hi Sheri,, ... Shouldn t have to. The Document settings are dealt with in two ways. This is what I have in PasteBack for one of my FAQ support questions. I
                                            Message 21 of 23 , Jan 5, 2004
                                            • 0 Attachment
                                              Hi Sheri,,

                                              >Apparently its not enough to set Trim White Spaces in
                                              >View|Options|Documents. With the [Clips] document open, I needed
                                              >to use Document|Properties, i.e., to select Use Default Settings!

                                              Shouldn't have to. The Document settings are dealt with in two ways.
                                              This is what I have in PasteBack for one of my FAQ support questions.
                                              I type in doc abd copy.cut it below starting in the next paragraph.
                                              The "doc" will not be there anymore of course. :)

                                              There are two settings for documents:

                                              One is in View | Options | Documents... It controls the features
                                              used for all new documents like when you click on the New
                                              Document icon on the Toolbar (Ctrl+N).

                                              The second is off the main menu under Document | Properties... It
                                              controls each document's settings, that is, the one you have
                                              focused in NoteTab. So, for an existing file you want to change
                                              the properties for that document in Document | Properties off the
                                              main menu. The properties for the focused file override the
                                              settings made in Options for all new documents. The settings are
                                              stored in NoteTab's main folder in NoteTab.fpr (NotePro.fpr for
                                              Pro) and remembered between NoteTab sessions.

                                              ----

                                              Me again. ;) If you go back to Document | Properties, you should
                                              be able to set Trim White Spaces then for the Clip Editor, hmmm,
                                              which is actually the .clb file. Soooo, perhaps for all new
                                              Libraries the Options settings will be used, but for existing
                                              Libraries that were made when you may have had Trim White Spaces
                                              unchecked when you made it would not work like we/I, well,
                                              finally, after all these years of fumbling around with that
                                              feature and on the list I think we stumbled across the "problem"
                                              with me talking us through it. Bet ya that is how it works. :)
                                              I'm too tired to test... been up all night again...

                                              Oh, what happened when you checked Use Default Settings - it uses
                                              what your current Options settings are at - not NoteTab's install
                                              default. Wanna bet? :) I'm just taking an educated guess??? Later

                                              Happy Clip'n!
                                              Jody

                                              www.clean-funnies.com, http://www.fookes.us/maillist.htm

                                              Subscribe: mailto:ntb-Clips-Subscribe@yahoogroups.com
                                              UnSubscribe: mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                                              Options: http://groups.yahoo.com/group/ntb-clips
                                            • Sheri
                                              Hi Jody, I guess something I had done in clip-edit (i.e., while editing the [Clips] document) was causing it not to use default properties, so my changing the
                                              Message 22 of 23 , Jan 5, 2004
                                              • 0 Attachment
                                                Hi Jody,

                                                I guess something I had done in clip-edit (i.e., while editing the [Clips] document) was causing it not to use default properties, so my changing the options default to Trim White Spaces had no effect. Maybe that had happened to Mangus too. I've discovered that even clicking Wordwrap on the toolbar disables default properties for the current document. There is only one set of properties that applies to the [Clips] document; it doesn't matter which library is active. New clippers should be warned to set Trim White Spaces in Document|Properties for [Clips] as well as in Options.

                                                IMO it would be helpful if the post-install default for Trim White Spaces was "on" instead of "off". Then unless the user changed that particular default option prior to ever using clip-edit he'd be all set. Just a thought for future versions :)

                                                Regards,
                                                Sheri
                                              • Jody
                                                Hi Sheri, (I ll let Eric know about this so that he can file this in his NoteTab - things to do/check folder.) ... That should be a bug then IMO. If you click
                                                Message 23 of 23 , Jan 6, 2004
                                                • 0 Attachment
                                                  Hi Sheri,

                                                  (I'll let Eric know about this so that he can file this in his
                                                  NoteTab - things to do/check folder.)

                                                  >I guess something I had done in clip-edit (i.e., while editing
                                                  >the [Clips] document) was causing it not to use default
                                                  >properties, so my changing the options default to Trim White
                                                  >Spaces had no effect.

                                                  That should be a bug then IMO. If you click on Document | Trim
                                                  White Spaces (TWS) in Properties (not Options), it should set it for
                                                  the whole clb file since NoteTab deals with the whole file.
                                                  (Sometimes we overlook that thinking the Clip Editor is a
                                                  separate entity.) (I don't write like this (saying things you
                                                  probably know) making it sound like you do not know what you are
                                                  doing, but for the benefit of others and a reminder for us all. :)

                                                  My argument is if you open a regular document and set TWS in the
                                                  document's Properties, it will/should be set overriding the
                                                  Default (our personal Options | Documents) settings. Therefore,
                                                  it should act the same with the Clipbook Library. I have not
                                                  checked to set it with the clb opened as a document, and not just
                                                  the Clip Editor. Perhaps that is where the glitch is.

                                                  >Maybe that had happened to Mangus too. I've discovered that even
                                                  >clicking Wordwrap on the toolbar disables default properties for
                                                  >the current document.

                                                  Yes, you will notice if you toggle the word wrap state and then
                                                  go to Document | Properties that it should be toggled there as
                                                  well. I've seen it like that. Never paid attention to see if it
                                                  does it "hot" or if NoteTab has to be restarted for it to show
                                                  though. Note that the Toolbar icons work hand in hand (tied
                                                  together) with the dialog check boxes. If you check the Word Wrap
                                                  box, then the Word Wrap icon will get depressed on the Toolbar
                                                  for instance.

                                                  >There is only one set of properties that applies to the [Clips]
                                                  >document; it doesn't matter which library is active. New clippers
                                                  >should be warned to set Trim White Spaces in Document|Properties
                                                  >for [Clips] as well as in Options.

                                                  I will have to investigate this further. I'm not agreeing or
                                                  disagreeing although in theory, it should not work like that at
                                                  least when compared to how other documents work with these
                                                  features. I think that would be the better setting though.
                                                  Although the Clipbook Library is its own think, NoteTab still
                                                  treats it as a file/document, at least for the most part.
                                                  Thinking about the Show Headers feature though - that works for
                                                  all Libraries. You cannot set it to show for one Library, but not
                                                  another. However, that is not a document property.

                                                  >IMO it would be helpful if the post-install default for Trim
                                                  >White Spaces was "on" instead of "off". Then unless the user
                                                  >changed that particular default option prior to ever using clip-
                                                  >edit he'd be all set. Just a thought for future versions :)

                                                  I agree if... you know more scripting and programming languages
                                                  than me, so maybe you know the answer. What if a programmer has
                                                  real white spaces at the end of an existing 30k line file with
                                                  460 lines ending in them. Ouch! We know he would have plenty of
                                                  backups, but nevertheless... :) Perhaps Eric could have a one
                                                  time warning whenever a document had a white space at the end of
                                                  the line and it was about to get removing stating what the
                                                  circumstances would be and the benefit of having it done.

                                                  Thanks for your feedback! Off to town now...

                                                  Happy Clip'n!
                                                  Jody

                                                  www.clean-funnies.com, http://www.fookes.us/maillist.htm

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