IDE property 'the watchedVariables' ?

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
OpenXTalkPaul
Posts: 1492
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

IDE property 'the watchedVariables' ?

Post by OpenXTalkPaul »

I've pulled the variable watcher stack from LCC v.8.1.10 into OXT.
Apparently this stack was removed in v.9.x
Examining the scripts I see there is an undocumented IDE property called the watchedVariables.
Does anybody know anything about this property?
'put the watchedVariables' -- puts empty...
set the watchedVariables to "anExistingVariableName" -- throws 'not a container'
Perhaps the IDE needs to be in 'debug' mode (IDE "debug" mode as opposed to 'development' mode) for that to be used?

Also in v8 (but not in v.9) I found there is a stack called 'revtemplatechooser.rev' that doesn't appear to be functional anymore. I would definitely like to have something like that, pre-built starter template stacks for a variety of use cases. This is one of the uses I had in mind for that XML or other markup text-based UI pseudo-stack format as an expansion on the 'script-only' stack format (which doesn't allow for graphics).

This is NOT distraction!
I found these while looking to correct the behavior of clicks on windows that occlude or are above the bottom of the "revMenuBar" stack.
User avatar
tperry2x
Posts: 1341
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: IDE property 'the watchedVariables' ?

Post by tperry2x »

Does anybody know anything about this property?
This is an absolute guess.
Back in the revolution days, of Mac OS9 - and I don't know if the same still applies all through to Livecode and hence OXT, I think the watchedVariables were some way of the engine keeping track of global variables?

In this test, I made a new stack, with a locked text field.
The script of the locked text field is:

Code: Select all

global testvar
on mouseup
put "something" into testvar
end mouseup
Then calling up the Variable Watcher I can see 'testvar' and 'something'

I then ran the script in the messagebox:

Code: Select all

put the watchedVariables
Nothing seemed to happen, but when I checked back at the Variable Watcher window, I have an 'each' entry with some kind of generated (reference?) number then ",1"

So I'm not sure if this helps.
Image
User avatar
OpenXTalkPaul
Posts: 1492
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: IDE property 'the watchedVariables' ?

Post by OpenXTalkPaul »

tperry2x wrote: Sat Jul 09, 2022 12:56 pm
Does anybody know anything about this property?
This is an absolute guess.
Back in the revolution days, of Mac OS9 - and I don't know if the same still applies all through to Livecode and hence OXT, I think the watchedVariables were some way of the engine keeping track of global variables?

In this test, I made a new stack, with a locked text field.
The script of the locked text field is:

Code: Select all

global testvar
on mouseup
put "something" into testvar
end mouseup
Then calling up the Variable Watcher I can see 'testvar' and 'something'

I then ran the script in the messagebox:

Code: Select all

put the watchedVariables
Nothing seemed to happen, but when I checked back at the Variable Watcher window, I have an 'each' entry with some kind of generated (reference?) number then ",1"

So I'm not sure if this helps.
Image
Yes that is interesting and may be helpful. I was doing other things back in the pre-LC/FOSS RunRev days (still using HyperCard, as well as trying to get into using AppleScriptObjC) and so I'm not entirely familiar with the whole MetaCard/RunRev history of this IDE.

I do remember using Variable Watcher (along with message watcher) quite a bit back in the HyperCard days.
I wonder why that was removed from v.9.x.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests