Page 1 of 1

Digging through functions

Posted: Sun Apr 21, 2024 10:17 am
by tperry2x
I'm digging around in various functions, to see what might be left over and interesting.
I stumbled on this. Does anyone have any ideas as to what it's intended to do?

Code: Select all

on revVerboseDebug pWhat
   global gREVVerboseDebug
   set the cVerboseDebug of stack "revPreferences" to pWhat
   -- setting this 'cause its going to crash, so save now
   -- MM-2011-03-13: [[ Bug 10073]] Make sure the stack file version is maintained at 2.7 for backwards compatability reasons
  revInternal__SavePreferences
   set the cVerboseDebug of stack "revPreferences" to pWhat
   set the messageMessages to pWhat
   put pWhat into gREVVerboseDebug
   if pWhat then
      delete file "verboseLog.txt"
      open file "verboseLog.txt" for text write
   end if
end revVerboseDebug

Re: Digging through functions

Posted: Sun Apr 21, 2024 10:38 am
by richmond62
The fact that '2.7' is mentioned suggests that is a fairly ancient bit of code.

Code: Select all

pWhat
or rather the role it seems to perform there makes me think of the 5 levels in HyperCard:
-
HCIntro8.gif
HCIntro8.gif (2.93 KiB) Viewed 420 times
-
https://vintageapple.org/macprogramming ... e_1987.pdf

Re: Digging through functions

Posted: Sun Apr 21, 2024 11:11 am
by tperry2x
It was the line:

Code: Select all

-- setting this 'cause its going to crash, so save now
that got my attention.

Re: Digging through functions

Posted: Sun Apr 21, 2024 12:03 pm
by richmond62
In the light of that line of code you wonder why the whole thing was left in the IDE and not removed.

Re: Digging through functions

Posted: Sun Apr 21, 2024 1:28 pm
by richmond62
Presumably . . .

Code: Select all

set the cVerboseDebug of stack "revPreferences" to pWhat
pWhat is a variable, so the first thing has to be to find out if verbose debugging can have parameters.

https://livecode.com/topic/debugging/

https://en.wikipedia.org/wiki/Verbose_mode

Queer, as as far as I can understand debugging is either verbose or not, and verbose debugging is not something that admits of degree.
-
Screenshot 2024-04-21 at 16.35.14.png
Screenshot 2024-04-21 at 16.35.14.png (188.24 KiB) Viewed 409 times

Re: Digging through functions

Posted: Sun Apr 21, 2024 5:22 pm
by tperry2x
richmond62 wrote: Sun Apr 21, 2024 1:28 pm Presumably . . .

Code: Select all

set the cVerboseDebug of stack "revPreferences" to pWhat
pWhat is passed either a true or false, on revVerboseDebug pWhat - It's the rest I'm wondering about. Perhaps ties into something in the revPreferences stack or the engine itself.

Seems to dump whatever it would be to a text file. Of course, there are varying levels of verbosity.

I don't know what relevance that image above has to do with anything, but it just means yet more scrolling for someone following along :| :?: