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

[Clip] Re: Opening large files with a clip

Expand Messages
  • Alan C.
    Hi Mike, If I have it right then what you have is a really large, long clipping of text that s in a clip and if no commands were in the clip then when
    Message 1 of 3 , Feb 28, 2002
    • 0 Attachment
      Hi Mike,

      If I have it right then what you have is a really large, long clipping of
      text that's in a clip and if no commands were in the clip then when
      launched, this clip would merely paste its contents into the current doc

      If the above is correct then ** I ** would try use one the methods
      available so as to have the large, long clipping of text, have it
      separated; in other words, do not have it as a part of the clip.

      Where you originally source the text from matters as to which of the
      methods you choose in order to have it "separated"

      Is the large, long text -- is it the same quite often? Or is it different,
      changes?

      My guess -- probably it (the large, long text) is the same many times in a
      row during each of the occasions you run the clip or you probably wouldn't
      repetitively make the effort to get such text stored into a clip in the
      first place.

      If I'm not on track, forgive me.

      But I DID have fun clip writing and maybe someone else wrote the little
      bit, that particular one that I was missing and needed for the latest clip
      I'm working on :-)

      I'm sure there's more; nonetheless, here follows **only* a couple**
      slightly differing ideas. Important (very): see # 2 clip's comment just
      below its :SameDoc label

      H="test for empty doc1"
      ^!If ^$GetLineCount$ < 1 SameDoc
      ^!ToolBar New Document
      ^!FocusDoc
      :SameDoc
      ^!InsertFile "c:\data\my_storage_doc_holds_large_long_text.txt"

      H="test for empty doc2"
      ^!If ^$GetLineCount$ < 1 SameDoc
      ^!ToolBar New Document
      ^!FocusDoc
      ^!InsertFile "c:\data\my_storage_doc_holds_large_long_text.txt"
      :SameDoc
      ; next line is missing a few needed ingredients
      ^!command to close a empty current doc goes here
      ^!appendtofile "c:\data\my_new_doc_to_paste_into_then_open.txt"
      ^$GetFileText("c:\data\my_storage_doc_holds_large_long_text.txt")$
      ^!Open "c:\data\my_new_doc_to_paste_into_then_open.txt"
      ; ------<end<<

      Regards. Alan.
    • mbl60181
      Hi Alan, ... Yes, that is what I have, just the 4 lines of code followed by nearly 10,000 lines of text to paste into a new document. I m working on a book &
      Message 2 of 3 , Mar 1, 2002
      • 0 Attachment
        Hi Alan,

        --- In ntb-clips@y..., "Alan C." <acummings@s...> wrote:
        > If I have it right then what you have is a really large,
        > long clipping of text that's in a clip and if no commands
        > were in the clip then when > launched, this clip would
        > merely paste its contents into the current doc

        Yes, that is what I have, just the 4 lines of code followed
        by nearly 10,000 lines of text to paste into a new document.
        I'm working on a book & the 10,000 lines are generally
        diagrams that I have created through various clips that
        I've written. It's beneficial to keep all that text in
        a clip because I can easily move the one .clp file
        between the 3 PC's I general use.

        I'm sure your solutions will work... I was just hoping
        to get around splitting it into a file. But working
        with your idea, I took only the text and moved that
        into a new clip. My new clip looks like this:

        H="test for empty doc1"
        ^!If ^$GetLineCount$ < 1 SameDoc
        ^!ToolBar New Document
        ^!FocusDoc
        :SameDoc
        ^!Clip "my_storage_doc_holds_large_long_text"

        Now it pops open immediately. I'll just write a little
        clip wizard over the top of it so I can select the file
        I want to open.

        Thanks for the help!

        Mike LaFountain
        lafmi01@...
      • Alan C.
        Hi Mike, ... It sounds like it pastes immediately too? A called clip, that s kin to a sub routine. You ve made it more modular than it was before. Now all of
        Message 3 of 3 , Mar 1, 2002
        • 0 Attachment
          Hi Mike,

          >^!FocusDoc
          >:SameDoc
          >^!Clip "my_storage_doc_holds_large_long_text"
          >
          >Now it pops open immediately. I'll just write a little
          >clip wizard over the top of it so I can select the file
          >I want to open.

          It sounds like it pastes immediately too?

          A called clip, that's kin to a sub routine. You've made it more modular
          than it was before.

          Now all of this makes me wonder about NoteTab's parsing. From your report,
          it appears to me that a called clip is not parsed until the (entire clip or
          parent) clip has already begun to run and the called clip is checked/parsed
          when reaches that particular point of the clips run. (might not be though)
          That would explain the difference in behavior.

          In my clip writing, I have been moving more and more to the use of called
          clips. I liken them to sub routines myself. When clip written that way
          makes it more modular. only 1 maybe 2 tasks per each called clip and/or
          per each section in any clip keeps greater organization along with more
          ease to look at it and translate to me what the clip does at each of its
          stages.

          excess on anything not good though. Balance. I wouldn't too too many
          called clips makes it too hard for me to follow when writing,
          troubleshooting, etc.

          plugin the term in some circles. more modular so that can add a plugin(s)
          for more task(s)

          Great! Thanks for sharing that. I learned something. Regards. Alan.
        Your message has been successfully submitted and would be delivered to recipients shortly.