global variables vs. custom properties

Bob Sneidar bobs at
Fri Jan 16 11:58:20 EST 2009

In addition to all that has been said, there is another issue with  
properties. With a variable you can execute chunk statements. Not so  
with properties. You could with a variable for example say:

put 25 into line 3 of myVariable

You could NOT say:

put 25 into line 3 of the myVariable of this stack

You would first have to "get" the property into a variable, then work  
with it, then "set" the property again.

Another thing that I like to use properties for is survival through  
compiles. Script Local variables get wiped on compiles so if you have  
script local environment variables that get initialized to some value  
that the operation of your app depends upon, and you edit and compile  
the script, your app breaks and you have to reinitialize everything. A  
fix for that is to save your critical environment data to properties  
at the end of your critical processes, and then check for the state of  
a script local variable before executing any critical process. If the  
Script Local variable is not what it ought to be, then you run a  
resume function that reads the properties back into your variables so  
your app is in the state it was before compiling.

A bit tedious I agree. Wouldn't it be nice if someone could write a  
plugin that did it for you? I would pay good money for that! <cough  
glx2 cough>

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Jan 16, 2009, at 12:51 AM, Tiemo Hollmann TB wrote:

> Hello,
> I know, that similar topics has been discussed a few time, but  
> didn't found
> any hard facts
> It is the usage of global variables vs. custom properties for non  
> persistant
> values, used at different parts within the app.
> I know, that most people prefer custom properties, but is it just a  
> question
> of "school", or is there perhaps a difference in memory usage or  
> other "hard
> facts"?
> Thanks
> Tiemo
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:

More information about the use-livecode mailing list