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

[Clip] Re: Preferences not being saved

Expand Messages
  • Lawrence R. Thomas
    Hi Aaron, ... No that setting is allowed only as a temporary setting for immediate use. You can also activate this setting by double-clicking on a document
    Message 1 of 9 , Mar 31 7:11 PM
    • 0 Attachment
      Hi Aaron,

      At 06:48 PM 3/31/1999 -0800, you wrote:
      >Howdy again -
      >
      >Another question for ya -
      >
      >When I open NTP, I have to manually right-click on a file tab and go to
      >"Allow Reordering" so that I can move files around in the tab bar. That
      >setting does not seem to be set when I close down NTP. Should it be?

      No that setting is allowed only as a temporary setting for immediate use.
      You can also activate this setting by double-clicking on a document tab.
      To turn it off you just double-click on any document tab again or do the
      right-click thing.

      >I'm trying to write a clip that changes the file attributes of the current
      >file. It's pretty self explanatory but doesn't quite work they way I want:
      >
      >^!attrib +r ^$GetDocName$
      >^!WAIT
      >^!Refresh
      >
      >(There's a partner to this with "-r" to make files read-only)
      >
      >However, while the file attribute changes on disk, NoteTab does not seem to
      >recognize this as a file change, and the file is not refreshed. If the
      >file is Closed and then Re-opened, the attributes are correct, but it's now
      >"out of place" (it's index changes), and there is more overhead.
      >

      I am not sure what you mean by NoteTab not recognizing the attribute
      change. I tried this and then I tried to do a Save As to the same file
      name and NoteTab gave me an error message telling me that the file was read
      only. The document properties tab does not reflect that the document is
      read only but you cannot re-save to it after you have changed it to read only.

      Regards,

      Larry
      larryt@...

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/list/ntb-clips
      Free Web-based e-mail groups by eGroups.com
    • Aaron
      Larry - ... Thanks - Double-clicking at least makes it easier. ... only. Sorry - I guess I ll need to be more explicit. Let me give an example: 1) Open a
      Message 2 of 9 , Mar 31 7:33 PM
      • 0 Attachment
        Larry -

        At 09:11 PM 3/31/99 -0600, you wrote:
        >No that setting is allowed only as a temporary setting for immediate use.
        >You can also activate this setting by double-clicking on a document tab.
        >To turn it off you just double-click on any document tab again or do the
        >right-click thing.

        Thanks - Double-clicking at least makes it easier.

        >>I'm trying to write a clip that changes the file attributes of the current
        >>file. It's pretty self explanatory but doesn't quite work they way I want:
        >>
        >>^!attrib +r ^$GetDocName$
        >>^!WAIT
        >>^!Refresh
        >>
        >>(There's a partner to this with "-r" to make files read-only)
        >>
        >>However, while the file attribute changes on disk, NoteTab does not seem to
        >>recognize this as a file change, and the file is not refreshed. If the
        >>file is Closed and then Re-opened, the attributes are correct, but it's now
        >>"out of place" (it's index changes), and there is more overhead.
        >>
        >
        >I am not sure what you mean by NoteTab not recognizing the attribute
        >change. I tried this and then I tried to do a Save As to the same file
        >name and NoteTab gave me an error message telling me that the file was read
        >only. The document properties tab does not reflect that the document is
        >read only but you cannot re-save to it after you have changed it to read
        only.

        Sorry - I guess I'll need to be more explicit. Let me give an example:
        1) Open a read-only file.
        2) Run:
        ^!attrib -r ^$GetDocName
        ^!WAIT
        ^!Refresh
        3) Try typing in the (now writeable) file

        The file's properties on disk have changed, but Notetab doesn't seem to
        refresh
        it's internal image of the file. Therefore, you can't actually type in the
        file until
        you close and then re-open it. I would have thought Refresh would compare
        it's internal file attributes (read only, from when it was first opened) to
        those on
        disk (now writeable) and updated itself accordingly.

        So, yes, the file is correct on disk, but NTPs attributes of that file are
        out of
        sync, and you can't edit it.

        Thanks very much - helpful as ever, Larry! :)


        *AC*

        What ever happened to Preparations A through G?
        I mean, do I really want to trust that part of my body
        to someone who got it wrong the first 7 times?!?
        - Aaron Cammarata

        ------------------------------------------------------------------------
        eGroup home: http://www.eGroups.com/list/ntb-clips
        Free Web-based e-mail groups by eGroups.com
      • Lawrence R. Thomas
        Hi Aaron. ... I have one more trick that may work for you. You can open a file that is already open. Do not reload it. Open it. NoteTab allows you to open
        Message 3 of 9 , Mar 31 7:55 PM
        • 0 Attachment
          Hi Aaron.

          At 07:33 PM 3/31/1999 -0800, you wrote:
          >Larry -
          >
          >Sorry - I guess I'll need to be more explicit. Let me give an example:
          >1) Open a read-only file.
          >2) Run:
          >^!attrib -r ^$GetDocName
          >^!WAIT
          >^!Refresh
          >3) Try typing in the (now writeable) file
          >
          >The file's properties on disk have changed, but Notetab doesn't seem to
          >refresh
          >it's internal image of the file. Therefore, you can't actually type in the
          >file until
          >you close and then re-open it. I would have thought Refresh would compare
          >it's internal file attributes (read only, from when it was first opened) to
          >those on
          >disk (now writeable) and updated itself accordingly.
          >
          >So, yes, the file is correct on disk, but NTPs attributes of that file are
          >out of
          >sync, and you can't edit it.
          >
          >Thanks very much - helpful as ever, Larry! :)

          I have one more trick that may work for you. You can open a file that is
          already open. Do not reload it. Open it. NoteTab allows you to open
          files that are already open. If you have made changes to the file, NoteTab
          will warn you that you are replacing a modified document with a previous
          file on disk and when you click ok it will open the file in the same index
          position as the original. If you have made not changes, it will move the
          focus to that document. When it opens NoteTab will recognize the attribute
          status of the file and your index position will not have changed. The only
          inconvenience you will experience is that the cursor position will change
          to the beginning of the file. You could write a clip for this for a work
          around though if you want it badly enough.

          Regards,

          Larry
          larryt@...

          ------------------------------------------------------------------------
          eGroup home: http://www.eGroups.com/list/ntb-clips
          Free Web-based e-mail groups by eGroups.com
        • Aaron
          ... Sneaky, but no sale... :) It seems that even re-opening the file doesn t re-sync the properties with the disk image. ; To make a file read-only: ^!Set
          Message 4 of 9 , Mar 31 8:05 PM
          • 0 Attachment
            >I have one more trick that may work for you. You can open a file that is
            >already open. Do not reload it. Open it. NoteTab allows you to open
            >files that are already open. If you have made changes to the file, NoteTab
            >will warn you that you are replacing a modified document with a previous
            >file on disk and when you click ok it will open the file in the same index
            >position as the original.

            Sneaky, but no sale... :)

            It seems that even re-opening the file doesn't re-sync the properties with the
            disk image.

            ; To make a file read-only:
            ^!Set %CURRENTFILENAME%=^$GetDocName$
            ^!attrib +r ^%CURRENTFILENAME%
            ^!WAIT
            ^!Open ^%CURRENTFILENAME% /R

            ; To make a file read-write:
            ^!Set %CURRENTFILENAME%=^$GetDocName$
            ^!attrib -r ^%CURRENTFILENAME%
            ^!WAIT
            ^!Open ^%CURRENTFILENAME%

            Tried every variation of with/without the "/R" option and the
            ^!OpenReadOnly command.
            But you get extra credit points for thinking of that way to come at it -
            very creative! :)

            Jody:

            >Perhaps all you need is something like:
            >
            >^!attrib +r ^$GetDocName$
            >^!KeyBoard Alt+D O Enter

            Also a good thought - I tried it but the problem is that it can still get
            out of sync with
            the disk file. Ex: Open a file that's read only (both on disk and in NTP).
            Run this
            script. Now your disk image is still read only but the NTP version is r/w.
            I looked
            through the help file again, and see nothing that lets me check the
            attributes of
            a disk file and/or a file that's open in NTP. (A la a ^$IsDocReadOnly$ or
            something).

            Or, if there were a ^!MakeDocReadOnly that would ABSOLUTELY make a document
            read-only within NTP (not touching the disk image), I could call it by
            itself in one
            clip, and follow it with ^!Keyboard Alt+D O in another, and know for sure
            that the disk
            and NTP files were in sync.

            Keep 'em coming - we're hot on the trail, I think! :) Very creative ideas
            - that's what's
            great about NTP and this list - people come up with great ways to solve
            problems.

            It seems if ^!Refresh checked the file attributes against disk file that
            would be best,
            though...

            *AC*

            What ever happened to Preparations A through G?
            I mean, do I really want to trust that part of my body
            to someone who got it wrong the first 7 times?!?
            - Aaron Cammarata

            ------------------------------------------------------------------------
            eGroup home: http://www.eGroups.com/list/ntb-clips
            Free Web-based e-mail groups by eGroups.com
          • Jody
            Hi Aaron, ... That is why I changed the doc to r/w in noteTab edited it and did the save. Try this on a read only: ^!KeyBoard Alt+D O Enter ^!InsertText ~~~
            Message 5 of 9 , Mar 31 8:31 PM
            • 0 Attachment
              Hi Aaron,

              >>^!attrib +r ^$GetDocName$
              >>^!KeyBoard Alt+D O Enter
              >
              >Also a good thought - I tried it but the problem is that
              >it can still get out of sync with the disk file.

              That is why I changed the doc to r/w in noteTab edited
              it and did the save. Try this on a read only:

              ^!KeyBoard Alt+D O Enter
              ^!InsertText ~~~
              ^!Replace "~~~" >> "" SB
              ^!Save

              Kind of sloppy and might be a better way. I remeber when
              I used it I needed it then and it worked so...

              C ya,
              Jody

              http://www.sureword.com/sojourner
              http://www.sureword.com/notetab

              ------------------------------------------------------------------------
              eGroup home: http://www.eGroups.com/list/ntb-clips
              Free Web-based e-mail groups by eGroups.com
            • Lawrence R. Thomas
              hI Aaron and Jody, ... Sometimes and freaquently writing clips and NoteTab tends to get a bit sloppy but it works and that is what counts. I like this idea
              Message 6 of 9 , Mar 31 8:53 PM
              • 0 Attachment
                hI Aaron and Jody,

                At 10:31 PM 3/31/1999 -0600, you wrote:
                >Hi Aaron,
                >
                >>>^!attrib +r ^$GetDocName$
                >>>^!KeyBoard Alt+D O Enter
                >>
                >>Also a good thought - I tried it but the problem is that
                >>it can still get out of sync with the disk file.
                >
                >That is why I changed the doc to r/w in noteTab edited
                >it and did the save. Try this on a read only:
                >
                >^!KeyBoard Alt+D O Enter
                >^!InsertText ~~~
                >^!Replace "~~~" >> "" SB
                >^!Save
                >
                >Kind of sloppy and might be a better way. I remeber when
                >I used it I needed it then and it worked so...

                Sometimes and freaquently writing clips and NoteTab tends to get a bit
                sloppy but it works and that is what counts. I like this idea better than
                mine. I did not test my idea with a clip as Aaron did. I simply changed
                the attributes and then used the file open button on my toolbar and
                selected the document. Wehn it came into focus, it was writable again.
                Sometimes what works manually does not work in a clip Huh!

                Regards,

                Larry
                larryt@...

                ------------------------------------------------------------------------
                eGroup home: http://www.eGroups.com/list/ntb-clips
                Free Web-based e-mail groups by eGroups.com
              • Aaron
                ... Sure - sloppy can usually be cleaned up. The clip, as specified by Jody, didn t work for me, because it relied on blindly toggling the document s read only
                Message 7 of 9 , Mar 31 9:12 PM
                • 0 Attachment
                  At 10:53 PM 3/31/99 -0600, you wrote:
                  >>That is why I changed the doc to r/w in noteTab edited
                  >>it and did the save. Try this on a read only:
                  >>
                  >>^!KeyBoard Alt+D O Enter
                  >>^!InsertText ~~~
                  >>^!Replace "~~~" >> "" SB
                  >>^!Save
                  >>
                  >>Kind of sloppy and might be a better way. I remeber when
                  >>I used it I needed it then and it worked so...
                  >
                  >Sometimes and freaquently writing clips and NoteTab tends to get a bit
                  >sloppy but it works and that is what counts. I like this idea better than
                  >mine. I did not test my idea with a clip as Aaron did. I simply changed
                  >the attributes and then used the file open button on my toolbar and
                  >selected the document. Wehn it came into focus, it was writable again.
                  >Sometimes what works manually does not work in a clip Huh!

                  Sure - sloppy can usually be cleaned up.

                  The clip, as specified by Jody, didn't work for me, because it relied on
                  blindly
                  toggling the document's read only state.

                  HOWEVER, persistence has paid off, ladies and gentlemen:

                  Here are 2 clips for you all to enjoy, which will ABSOLUTELY set the current
                  document to either read-only or read-write, both in NoteTab and on the disk.
                  I think they're fairly clear - the problem was that pesky ^$IsReadOnly$ was
                  hidden in the Testing Conditions help page, and I overlooked it:

                  ; This one makes current file read-writable.
                  ^!attrib -r ^$GetDocName$
                  ^!WAIT
                  ^!IfFalse ^$IsReadOnly$ End
                  ^!KeyBoard Alt+D O

                  :End

                  ; This one makes current file read-only.
                  ^!attrib +r ^$GetDocName$
                  ^!WAIT
                  ^!IfTrue ^$IsReadOnly$ End
                  ^!KeyBoard Alt+D O

                  :End

                  Thanks Jody and Larry for your help!
                  *AC*

                  What ever happened to Preparations A through G?
                  I mean, do I really want to trust that part of my body
                  to someone who got it wrong the first 7 times?!?
                  - Aaron Cammarata

                  ------------------------------------------------------------------------
                  eGroup home: http://www.eGroups.com/list/ntb-clips
                  Free Web-based e-mail groups by eGroups.com
                • Jody
                  Hi Aaron & Larry, ... Yeppers. Glad you got something you can use. If I ever see a read only doc it gets changed to r/w as fast as I can - can t stand read
                  Message 8 of 9 , Mar 31 9:37 PM
                  • 0 Attachment
                    Hi Aaron & Larry,

                    >>Sometimes and freaquently writing clips and NoteTab tends to get
                    >>a bit sloppy but it works and that is what counts.

                    Yeppers. Glad you got something you can use. If I ever see a read
                    only doc it gets changed to r/w as fast as I can - can't stand read
                    only so I have no need to check for it first. :)

                    >; This one makes current file read-writable.

                    Cya,
                    Jody Adair

                    The whole world doth err save you
                    and me and even thou doest err some!

                    http://www.sureword.com/kjb1611/

                    ------------------------------------------------------------------------
                    eGroup home: http://www.eGroups.com/list/ntb-clips
                    Free Web-based e-mail groups by eGroups.com
                  • Wayne VanWeerthuizen
                    ... Don t overlook commands again! Get the NoteTab Reference Outline! Here s the entry for OpenReadOnly: ^!OpenReadOnly FileName (added in v4.6) Opens or
                    Message 9 of 9 , Mar 31 9:54 PM
                    • 0 Attachment
                      "Aaron" <Aaron@...> wrote:

                      >Here are 2 clips for you all to enjoy, which will ABSOLUTELY set the current
                      >document to either read-only or read-write, both in NoteTab and on the disk.
                      >I think they're fairly clear - the problem was that pesky ^$IsReadOnly$ was
                      >hidden in the Testing Conditions help page, and I overlooked it:

                      Don't overlook commands again! Get the NoteTab Reference Outline!

                      Here's the entry for OpenReadOnly:


                      ^!OpenReadOnly FileName (added in v4.6)

                      Opens or selects the specified document "FileName". You
                      can use wildcards with this command. Newly opened files
                      are set as Read-Only.


                      See topic:
                      [Clip Language - Document Management]

                      See also:
                      [InsertFile]
                      [IsReadOnly]
                      [Open]
                      [OpenAscii]
                      [OpenEbcdic]
                      [OpenReadOnly]

                      =========================================================

                      Notice that ^$IsReadOnly$ is among the cross-references.


                      You could have also found out about ^$IsReadOnly$ from
                      looking up:

                      ^$IsModified$

                      Returns 1 if current document needs saving, or 0 if it is not modified.


                      See topic:
                      [Clip Language - Testing Conditions]

                      See also:
                      [DeleteFile]
                      [Document]
                      [If]
                      [IsFileType]
                      [IsHtmlDoc]
                      [IsOpen]
                      [IsPasteBoard]
                      [IsReadOnly]
                      [IsSecondWindow]
                      [IsTrimBlanks]
                      [IsWordWrap]
                      [Save]

                      =========================================================


                      With the NoteTab Reference Outline, looking for commands
                      that are somewhat similar or related - can lead you to
                      the command you are searching for.




                      Download the NoteTab Reference Outline from:

                      http://landru.myhome.net/wayne/notetab.html




                      --
                      Wayne M. VanWeerthuizen
                      ICQ: 15117288
                      Homepage: http:/landru.myhome.net/wayne


                      ------------------------------------------------------------------------
                      eGroup home: http://www.eGroups.com/list/ntb-clips
                      Free Web-based e-mail groups by eGroups.com
                    Your message has been successfully submitted and would be delivered to recipients shortly.