Custom Properties vs globals
david at openpartnership.net
Tue Jul 17 13:24:50 EDT 2007
A related question I have is - say you have the principle of not changing a
stack but keeping all changes external - so you want to "purge" everything.
I guess you can still use custom properties as long as they don't get saved
- so how do you ensure the stack doesnt get saved - can you use the
cantmodify property or something similar and still use custom properties -
its just that you cant save them?
On 17/07/07, Ken Ray <kray at sonsothunder.com> wrote:
> On Tue, 17 Jul 2007 09:59:28 +0800, Kay C Lan wrote:
> > 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
> > all those to .......... because I need to.....' moments ;-)
> One thing to keep in mind is that globals are automatically purged when
> Rev quits, whereas custom properties have the *possibility* of being
> saved in a particular state, especially if this is a "data stack" that
> you're allowing users to add data to and save to disk.
> So to be 100% accurate, you'd need to always clear out the custom
> properties you plan on using for "stack-level globals". And to that
> end, I've been using custom property *sets* for this purpose, so I can
> lump all my stack-level globals into a single custom property set that
> I can delete when my program launches before any props are set. If the
> set doesn't exist, no problem and no error; if it does, it gets wiped.
> Eventually it would be nice to be able to declare stack-level globals
> (or whatever one might want to call them) that get the benefit of
> automatic purging and don't collide with other stacks...
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode