Hi everyone,
I was wondering if there was any way for me to view an array while my application is running. I've been running into a problem with my array and I want to see what is actually happening in there while I test it. Is there any way for me to do this? Thanks for your help!
Viewing array for testing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Viewing array for testing
Hi,
When the debugger is active, you can view your array in the variables tab at the bottom of the script editor.
Kind regards,
Mark
When the debugger is active, you can view your array in the variables tab at the bottom of the script editor.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Viewing array for testing
HI.
As Mark says, the debugger shows the keys and elements of an array directly, but only when a script is being examined. This is very convenient.
But you said "while running". In this case you will need to view the array, perhaps in a field or dataGrid, on the fly.
So in your running handler, in the right place(s):
combine yourArray by return and tab
put yourArray into fld "viewArray"
The array will appear every time the code snippet is executed, which could be each pass through a loop, or wherever.
Craig Newman
As Mark says, the debugger shows the keys and elements of an array directly, but only when a script is being examined. This is very convenient.
But you said "while running". In this case you will need to view the array, perhaps in a field or dataGrid, on the fly.
So in your running handler, in the right place(s):
combine yourArray by return and tab
put yourArray into fld "viewArray"
The array will appear every time the code snippet is executed, which could be each pass through a loop, or wherever.
Craig Newman
-
- Posts: 77
- Joined: Thu Dec 08, 2011 12:19 pm
Re: Viewing array for testing
Whoa awesome, I didn't even notice the Variables tab down there before you mentioned it. Thanks for the replies, Mark and Craig, this is perfect!