Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
Dick99999
- Pro Scripter
- Posts: 84
- Joined: Thu Nov 27, 2008 10:25 am
- Location: Netherlands
Post
by Dick99999 » Thu Aug 12, 2010 10:25 am
My watchlist stops updating after setting localvars to 0, see below. However, The assigned varaiables don' shuffle anymore in the list. The values are being updated.
I cannot duplicate it in a short script. So the one below is just a model. What would stop the watchlist from being updated?
Code: Select all
gosub>proc
SRT>proc
let>port=0
Let>LOCALVARS=1
//some code handling vaiable lenth arrays let>n=0
let>n=1
let>localArray_%n%=1
let>n=n+1
let>localArray_%n%=2
Let>LOCALVARS=0
let>nn=1
let>globalArray_%nn%=localArray_1
let>nn=nn+1
let>globalArray_%nn%=localArray_1
END>proc
Last edited by
Dick99999 on Fri Aug 13, 2010 6:58 am, edited 1 time in total.
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Thu Aug 12, 2010 2:22 pm
Hi Dick,
I tried it and it is working as expected.
The local variables are updated in the watchlist but are cleared out after the script leaves the subroutine. Put a wait>10 in the last statement of proc and run in trace mode. You will see:
1. port appears
2. n appears
3. localArray appears
4. global nn appears
5. globalArray appears
6. n and localArray disappears
7. port, nn, globalArray remains at end of script.
Gale
-
Dick99999
- Pro Scripter
- Posts: 84
- Joined: Thu Nov 27, 2008 10:25 am
- Location: Netherlands
Post
by Dick99999 » Thu Aug 12, 2010 3:57 pm
Thanks a lot for trying. Sorry for the apparent confusion. I agree that the localvars work. The point is that the debug watchlist is not shuffled anymore so that variables changed, appear on top. The values themselves do change. That is after localvars=0.
As said I could not duplicate it with the given example, only in a large script. Will try to reduce that.
-
JRL
- Automation Wizard
- Posts: 3526
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Aug 12, 2010 4:25 pm
In the editor under the "Debug" menu, is "Lock Watch List Position" checked?
-
Dick99999
- Pro Scripter
- Posts: 84
- Joined: Thu Nov 27, 2008 10:25 am
- Location: Netherlands
Post
by Dick99999 » Thu Aug 12, 2010 5:59 pm
Just double checked that, no it's not and also it's not set after the localvars=0. But my check did reveal that the watchlist runs again when being out of the subroutine that contains the localvar setting!
-
Dick99999
- Pro Scripter
- Posts: 84
- Joined: Thu Nov 27, 2008 10:25 am
- Location: Netherlands
Post
by Dick99999 » Fri Aug 13, 2010 7:01 am
Solved this, by watching carefully. It appears that the watchlist is sorted by 'localvar position'. Global variables appear at the bottom. If you have many local vars, the globals scroll of the watchlist (on screen) and you don't see the updated variables scrolling to the top of the global list.
Logical, but good to realize.