poll results and new poll

Rob Cozens rcozens at pon.net
Tue Feb 21 13:06:25 EST 2006


Hi Josh,

> Custom Properties is the winner!
>
> _______________________________________
>
> When I need access to a value throughout a stack:
>
>     * I will usually use a custom property: 50% (11)
>     * about 50%/50%: 27% (6)
>     * I will usually use a global variable: 23% (5)

IMFO your poll neglects three critical factors:  persistence, scope, 
and data type.

* Persistence--

A. If the value must persist between between runtime sessions, a custom 
property or preferences file is required.

B. If the value must persist between closing/reopening the stack in the 
same runtime session, but not between sessions, a global variable is 
more appropriate.

C. If the value need not persist beyond closeStack, a local variable 
may be the better choice.

* Scope--

A.  If the value should be accessible only within the scope of the 
stack, this is best accomplished with a local variable.

B.  If the value should be accessible to any stack opened at runtime, a 
global variable is the simplest approach.

* Data Type--

A. If the data type of the value is not supported directly in 
Transcript (eg: binary), a custom property may be the clear choice.

The issue is not so much "Do you use Method A, B, C, or D?" as it is 
"Is Method A, B, C, or D most appropriate in this particular 
situation?"


Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)




More information about the use-livecode mailing list