Custom Properties vs globals
Kay C Lan
lan.kc.macmail at gmail.com
Tue Jul 17 07:17:17 EDT 2007
On 7/17/07, Michael Binder <runr at prismpole.com> wrote:
> If you use a substack as a calendar viewer/editor, and set the
> saveFlag of substack 'myCalendarViewer' to true, you can then
> clone the substack as many times as you like and each clone
> will have its own 'saveFlag'.
Thanks Michael, yes I think I'm happy for 'flag' situations custom props are
the way to go. My current rule of thumb, as no-one has confirmed or denied
that you can't set a custom prop chunk directly, is;
if it's a single value, go with custom props.
if it's multiple chunks, but always the same size, go with a custom prop
ie you might need to store 3 lines and refer to either or all, then
if it's multiple chunks of variable size, but you know the maximum size
you'll be dealing with, AND empty values is not a problem, then you can
still go with a custom set.
ie you might need to store a list of 15 to 20 items, then create a custom
set with 20 custom properties.
if it's multiple chunks of variable size, but you have no idea what the
maximum number of chunks will be, or returning an empty value will cause
logic errors, then go with a global.
More information about the Use-livecode