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

Re: [Clip] Staus check of ^!SetDebug

Expand Messages
  • mbl60181
    ... Sure could but... I m calling the ^!Farclip about 10 times in many different places and didn t want to bother with that method. -Mike
    Message 1 of 10 , Jul 1, 2003
    • 0 Attachment
      RS Wrote:
      > I would turn off debugging before the call to FarClip and enable it
      afterwards:
      >
      > ^!SetDebug OFF
      > ^!Farclip A_Clip_That_Doesnt_Need_Debugging
      > ^!SetDebug ON
      >

      Sure could but... I'm calling the ^!Farclip about 10 times in
      many different places and didn't want to bother with that method.

      -Mike
    • Don Passenger
      If you look at the is functions here: mk:@MSITStore:C: Program%20Files NoteTab%20Pro ClipCode.chm::/clip_language_ __testing_condit.htm (you may need to adjust
      Message 2 of 10 , Jul 1, 2003
      • 0 Attachment
        If you look at the is functions here:

        mk:@MSITStore:C:\Program%20Files\NoteTab%20Pro\ClipCode.chm::/clip_language_
        __testing_condit.htm

        (you may need to adjust if your hard drive is diff -- but it is under
        Testing Conditions in the Clip Help) you won't find ^$IsDeBug$ there. I
        assume that means it doesn't exist.

        I sometimes use:
        ^!Set %word_wrap%=^$IsWordWrap$
        ^!SetWordWrap 0
        ;code here
        ^!SetWordWrap ^%word_wrap%
        which will return wordwrap status to where it was before (as usual I ripped
        the idea off from someone). I think that is what you are trying to do on
        your clip. I don't think Larry's clip works unless you have set the
        wordwrap status using the variable, but absent a "program variable" set
        somewhere, I think it is probably the only way to do it. There must be such
        a "program variable" obviously, but the question I suppose is ... can we
        access it?

        --

        Don Passenger

        If you need an html fix visit
        http://www.htmlfixit.com

        html/perl/php/xhtml/javascript presented
        in easy tutorials with live help and forums
        to fix your problems
        ----- Original Message -----
        From: "mbl60181" <mlafount@...>
        To: <ntb-clips@yahoogroups.com>
        Sent: Tuesday, July 01, 2003 2:55 PM
        Subject: Re: [Clip] Staus check of ^!SetDebug


        > Larry wrote
        > >
        > > It doesn;t seem to me necessary to know the status of Setdebug.
        > Just do
        > > the following in your code.
        > >
        > > If SetDebug is on:
        > >
        > > ^!SetDebug Off
        > > ^!Farclip.....
        > > %!SetDebug On
        >
        > Yes but... the ^!Farclip is ran several times (over 10) from the
        > clip I'm writting. So this is a mild pain in the dupa.
        >
        >
        > > In fact you can pass commands to a variable and use them in this
        > fashion:
        > >
        > > ^!Set %Command%=SetDebug On
        > >
        > > then at the proper place(s) in your code
        > >
        > > ^!^%Command%
        > >
        > > I hope this helps.
        >
        > I didn't know you could do that. I'll keep it in mind. It might be
        > useful sometime :-) But it's kinda overkill for this situation. It is
        > the equivelent of passing a flag to the ^!Farclip. I could just as
        > easily say:
        >
        > ^!Set %DebugStatus%=On
        >
        > Then check it in the ^!Farclip. I'm looking for a method to not set
        > additional flags and still check the debug status. That would make
        > the routine more self-contained.
        >
        > -Mike
      • hugo_paulissen
        ... Mike (et al), Why don t you ^!SetDebug OFF at the beginning of the FARCLIP and switch it back [^!SetDebug] ON at the end of it? Hugo
        Message 3 of 10 , Jul 1, 2003
        • 0 Attachment
          > >
          > > ^!SetDebug OFF
          > > ^!Farclip A_Clip_That_Doesnt_Need_Debugging
          > > ^!SetDebug ON
          > >
          >
          > Sure could but... I'm calling the ^!Farclip about 10 times in
          > many different places and didn't want to bother with that method.
          >
          > -Mike

          Mike (et al),

          Why don't you ^!SetDebug OFF at the beginning of the FARCLIP and
          switch it back [^!SetDebug] ON at the end of it?

          Hugo
        • RS
          Mike, ... Then, do it in the FarClip: H=YourFarClip ^!SetDebug OFF [... here the clip s code ...] ^!SetDebug ON Regards, RS
          Message 4 of 10 , Jul 1, 2003
          • 0 Attachment
            Mike,

            At 06:39 PM 07/01/03 -0000 you wrote:
            >RS Wrote:
            >> I would turn off debugging before the call to FarClip and enable it
            >afterwards:
            >>
            >> ^!SetDebug OFF
            >> ^!Farclip A_Clip_That_Doesnt_Need_Debugging
            >> ^!SetDebug ON
            >>
            >
            >Sure could but... I'm calling the ^!Farclip about 10 times in
            >many different places and didn't want to bother with that method.
            >


            Then, do it in the FarClip:

            H=YourFarClip
            ^!SetDebug OFF
            [... here the clip's code ...]
            ^!SetDebug ON




            Regards,

            RS
          • Alec Burgess
            RS, (Mike et al) Problem is (I think) that Mike NEVER needs to debug inside the Farclip (presumably its already been thoroughly debugged) but SOMETIMES he s
            Message 5 of 10 , Jul 1, 2003
            • 0 Attachment
              RS, (Mike et al)

              Problem is (I think) that Mike NEVER needs to debug inside the Farclip
              (presumably its already been thoroughly debugged) but SOMETIMES he's using
              it in the main clip and if on before entry he wants it restored upon exit.

              If Notetab doesn't provide a primitive that captures the status of SetDebug
              ON/OFF I can't see anyway around using some intermediate variable that he
              always sets at the same time SetDebug itself is changed.

              Then any section of code that is to be NEVER debugged can unconditionally
              turn it off on entry and conditionally restore it on exit based on the value
              of the semaphore.

              Maybe a single (called) clip done right could be used at entry and exit and
              a pair of clip buttons created to toggle the semaphore and the SetDebug
              ON/OFF in sync.

              As badly as I code, if I did more or of it I probably wind doing something
              like this.

              IMHO: Addition of an ^&IsDebugOn$ would be useful if not essential


              Regards ... Alec
              --

              ---- Original Message ----
              From: "RS" <ptools@...>
              To: <ntb-clips@yahoogroups.com>
              Sent: Tuesday, July 01, 2003 18:49
              Subject: Re: [Clip] Staus check of ^!SetDebug

              > Mike,
              >
              > At 06:39 PM 07/01/03 -0000 you wrote:
              >> RS Wrote:
              >>> I would turn off debugging before the call to FarClip and enable it
              >>> afterwards:
              >>>
              >>> ^!SetDebug OFF
              >>> ^!Farclip A_Clip_That_Doesnt_Need_Debugging
              >>> ^!SetDebug ON
              >>>
              >>
              >> Sure could but... I'm calling the ^!Farclip about 10 times in
              >> many different places and didn't want to bother with that method.
              >>
              >
              >
              > Then, do it in the FarClip:
              >
              > H=YourFarClip
              > ^!SetDebug OFF
              > [... here the clip's code ...]
              > ^!SetDebug ON
            Your message has been successfully submitted and would be delivered to recipients shortly.