Put an array into a field?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Put an array into a field?

Post by RossG » Sat Dec 05, 2015 8:51 pm

I want to see what an array is doing and would
like to show an array in a field.

My attempts (guesses) at how to do this have so
far failed.

Does LC have a "watch window" which will monitor
changes to, say, a variable?

Help appreciated.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Put an array into a field?

Post by SparkOut » Sat Dec 05, 2015 8:58 pm

In the script editor set breakpoints and step through the code. At the bottom of the debugger windowchoose the variables tab.
This will show the values of variables as you step through. In the case of an array you can see the keys and contents by expanding the view with the "disclosure arrow" against the array name.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Put an array into a field?

Post by dunbarx » Sun Dec 06, 2015 6:36 am

What Sparkout said.

The debugger is just about the only place you can "see" an array while it still is an array. In order to show it in a field, it must be changed into a ordinary variable first, using the "combine" command.

There is an array world, and a real world. Going from one to the other is simple, but often confuses new users.

You might find a recent thread ("Custom Properties") in the "Talking Livecode " section of this forum , where such things were just discussed. A little experimentation is called for.

Craig Newman

Post Reply