Custom Properties vs globals

Kay C Lan lan.kc.macmail at gmail.com
Mon Jul 16 20:59:28 CDT 2007


This comes up every know and then and I'd like to thank all those on the
list who opened my eyes to custom properties, I've been using them much much
more of late but have come across situations where I need to convert the
custom property to a global, to make life easy.

I just wish to confirm that although you can:

put line 3 of the cMyCustomProp of stack "myStack" into myVar

you can't:

set line 3 of the cMyCustomProp of stack "myStack" to myLine

you must:

put the cMyCustomProp of stack "myStack" into myVar
put myLine into line 3 of myVar
set the cMyCustomProp of stack "myStack" to myVar

and so conclude, as the situation appears to be the same for other chunks
(words,char items) in situations where you need to manipulate chunks*, a
global is probably more efficient and custom properties should be confined
to situations where you're only interested in the 'whole' data.

*this is obviously only referring to situations where you need to access
data from all over a stack and are therefore considering whether a global or
a custom property is  your best bet.

I'm just trying to formulate some 'rules of thumb' of when to use custom
props and when globals, so I can avoid the 'goshhhh, now I need to change
all those to .......... because I need to.....' moments ;-)

Thanks for your insights.



More information about the use-livecode mailing list