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

Staus check of ^!SetDebug

Expand Messages
  • mbl60181
    Does anyone know how to check the status of debug from within a clip? I know that sounds like a silly question but it isn t really... I have a clip that is
    Message 1 of 10 , Jul 1 9:54 AM
    • 0 Attachment
      Does anyone know how to check the status of debug from within a clip?
      I know that sounds like a silly question but it isn't really...

      I have a clip that is only used by ^!Farclip. When the ^!Farclip is
      used, I don't need debug on, but when I return to the parent clip, I
      would like to restore the status of the debug command: On if it was
      on or Off if it was off.

      Anyone got any ideas? I know I could pass a flag (variable) to the ^!
      Farclip but it would be easier if I could just check from within the
      ^!Farclip.

      Thanks Much!
      -Mike LaFountain
    • Larry Thomas
      ... 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.....
      Message 2 of 10 , Jul 1 10:15 AM
      • 0 Attachment
        At 04:54 PM 7/1/03 -0000, you wrote:
        >Does anyone know how to check the status of debug from within a clip?
        >I know that sounds like a silly question but it isn't really...
        >
        >I have a clip that is only used by ^!Farclip. When the ^!Farclip is
        >used, I don't need debug on, but when I return to the parent clip, I
        >would like to restore the status of the debug command: On if it was
        >on or Off if it was off.
        >
        >Anyone got any ideas? I know I could pass a flag (variable) to the ^!
        >Farclip but it would be easier if I could just check from within the
        >^!Farclip.
        >
        >Thanks Much!
        >-Mike LaFountain

        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

        If SetDebug is Off

        ^!SetDebug On
        ^!Farclip.....
        %!SetDebug Off

        And that would seem to take care of your problem.

        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.

        Regards,

        Larry
        lrt@... e¿ê
      • RS
        Mike, ... I would turn off debugging before the call to FarClip and enable it afterwards: ^!SetDebug OFF ^!Farclip A_Clip_That_Doesnt_Need_Debugging ^!SetDebug
        Message 3 of 10 , Jul 1 11:12 AM
        • 0 Attachment
          Mike,

          At 04:54 PM 07/01/03 -0000 you wrote:
          >Does anyone know how to check the status of debug from within a clip?
          >I know that sounds like a silly question but it isn't really...
          >
          >I have a clip that is only used by ^!Farclip. When the ^!Farclip is
          >used, I don't need debug on, but when I return to the parent clip, I
          >would like to restore the status of the debug command: On if it was
          >on or Off if it was off.
          >
          >Anyone got any ideas? I know I could pass a flag (variable) to the ^!
          >Farclip but it would be easier if I could just check from within the
          >^!Farclip.
          >

          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



          Regards,

          RS
        • 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 4 of 10 , Jul 1 11:39 AM
          • 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
          • Larry Thomas
            ... I think that I have the solution to what you want to do. First set a veriable for the command. ^!Set %Command%=SetDebug On Then place the following code
            Message 5 of 10 , Jul 1 11:42 AM
            • 0 Attachment
              At 04:54 PM 7/1/03 -0000, you wrote:
              >Does anyone know how to check the status of debug from within a clip?
              >I know that sounds like a silly question but it isn't really...
              >

              I think that I have the solution to what you want to do. First set a
              veriable for the command.

              ^!Set %Command%=SetDebug On

              Then place the following code where ever you want to start Debug.

              ^!^%Command%

              Now place the following code at the start of you clip that you are calling
              from Farclip.

              ^!IfSame "^%Command%" "SetDebug On" Next ELSE Skip
              ^!SetDebug Off
              ^!IfSame "^%Command%" "SetDebug Off" Next ELSE Skip
              ^!SetDebug On

              And place the following code at the end of your clip that you are calling
              from Farclip.

              ^!IfSame "^%Command%" "SetDebug Off" Next ELSE Skip
              ^!SetDebug On
              ^!IfSame "^%Command%" "SetDebug On" Next ELSE Skip
              ^!SetDebug Off

              You will have to test this but if ^%Command% is not set to either value, I
              think that it will do nothing as the lines to turn Debug on or off will be
              skipped.

              Regards,

              Larry
              lrt@... e¿ê
            • mbl60181
              Larry wrote ... Just do ... 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. ... I
              Message 6 of 10 , Jul 1 11:55 AM
              • 0 Attachment
                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
              • 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 7 of 10 , Jul 1 12:22 PM
                • 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 8 of 10 , Jul 1 2:38 PM
                  • 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 9 of 10 , Jul 1 3:49 PM
                    • 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 10 of 10 , Jul 1 7:22 PM
                      • 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.