the Visible Variable

Sarah Reichelt sarah.reichelt at gmail.com
Fri Apr 14 17:23:49 EDT 2006


On 4/15/06, Josh Mellicker <josh at dvcreators.net> wrote:
> Instead of global variables or custom properties, I've been using a
> data stack to hold data in fields.
>
> Crazy? Been there done that? Good idea? Comments?
>

Yes, I do this all the time. There is no need to "go to" or to "show"
the data stack, so the speed difference between using fields & using
custom properties effectively disappears. However it makes debugging
very easy as you can inspect & edit your data directly if needed.
Backing up the data is also made simple, since you just save a copy of
the stack.

I make sure that each data field, check box,menu button or radio
button has it's own unique name, then I collate all these names & the
name of their card into a custom property of the data stack. I have
generalised setData, getData handlers & functions that look at this
list, find the appropriate data object on it's card, and either change
or return it's value.

This is working really well for me in several big projects.

HTH,
Sarah



More information about the use-livecode mailing list