Variable Watcher stack refresh automatically

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Variable Watcher stack refresh automatically

Post by erikhans08 »

Is there a way to get the Variable Watcher stack to update automatically like the VW section below the code? Also the appearance of the VW section is easier to view.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Variable Watcher stack refresh automatically

Post by jacque »

What variable watcher stack do you mean? Is there something other than the Variables pane in the debugger?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Variable Watcher stack refresh automatically

Post by erikhans08 »

Stack "revVariableWatcher"
There is a Context menu at the top where you select the last (lowest) line then the variable values are refreshed.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Variable Watcher stack refresh automatically

Post by jacque »

What LC version are you using? The separate variable watcher window was removed some time before version 6.6.x, which is the oldest version I still have installed. I remember there used to be a Variable Watcher option in the Development window but it was quite a while ago.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Variable Watcher stack refresh automatically

Post by erikhans08 »

I am using Community 7.0.6 recently re-installed. My stacks were originally .REV. Must be some kind of artifact.

I really like using the separate Variable Watcher stack placed to the left of the Code Editor. The Variable Watcher inside the code Editor has a nice easy to use appearance compared to stack "revVariableWatcher" but you have to scroll down from $# past $USERPROFILE to get to your own variables. Awkward even without the lines of $*.

The Global Variables option in Msg would be a good model for an external Variable Watcher.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Variable Watcher stack refresh automatically

Post by jacque »

It would make a good feature request in the QCC.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: Variable Watcher stack refresh automatically

Post by dunbarx »

One trick you simply must try is to hack the script for the variable watcher. This is from Thierry.

Open the script of stack "revdebugger.rev" Find the handler "revDebuggerValidGlobalNames". Place this in its stead:

function revDebuggerValidGlobalNames
local tGlobalsRaw
put the globals into tGlobalsRaw

replace comma with return in tGlobalsRaw

filter tGlobalsRaw without "*(x86)"
filter tGlobalsRaw without "$*"
filter tGlobalsRaw without "grev*"
replace return with comma in tGlobalsRaw

return tGlobalsRaw
end revDebuggerValidGlobalNames

Craig Newman
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Variable Watcher stack refresh automatically

Post by erikhans08 »

Wowwwwwww. (10 chars)
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Variable Watcher stack refresh automatically

Post by erikhans08 »

Craig,
Thanks for sending that but the code seems to be for another perhaps earlier VW. None of handlers or even code showed up in a search from inside the editor using the Find and More button approach - the most effective in my stacks.

I still use my revVariable stack because it is the most convenient.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: Variable Watcher stack refresh automatically

Post by dunbarx »

Hi.

The name has changed to protect the innocent. Try this:

edit the script of stack "revdebuggerLibrary"

Craig
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Variable Watcher stack refresh automatically

Post by erikhans08 »

LiveCode freezes when I paste "*-*" into revDebuggerValidGlobalNames
then try to save. The original script has only these two lines to delete per Thierry:

filter tGlobalsRaw without "*/*" // this I safely commented out.
filter tGlobalsRaw without "*-*" // the culprit. Commenting this out this freezes LC

These are the lines to paste in if I get that far:

filter tGlobalsRaw without "$*"
filter tGlobalsRaw without "grev*"

Can I just paste these in without deleting "*/*" and "*-*"?
What is "grev" all about?
The following globals occur only in stack "revDebuggerLibrary"
global gREVDevelopment
global gREVShowStacks
global gREVSuppressErrors

For that matter, what do
"*/*"
"*-*"
"grev*"
"$*"
actually do?

This all way beyond me but a handy Variable Watcher is so important.

Erik Hansen
Post Reply