How to store a stack in a custom property
jim at visitrieve.com
Mon Apr 27 00:12:08 EDT 2009
Joe Lewis Wilkins wrote:
> I'm obviously missing something, since all of the things you mention
> can be done with external text files or other stacks that can be read
> or written to from scripts when their needs arise. I've done some
> pretty sophisticated data manipulation in this manner. I guess I just
> don't like the name "custom property" for its being to non-descriptive
> of what it "is/does/can do". I guess it's one of those "old dog/new
> trick" syndromes. Jacqi once, very patiently, tried to explain their
> use to me, all sorts of links to the "tutorials" of others (probably
> one of yours), but since I never really had a need for them I couldn't
> resolve otherwise, I found it impossible to focus on understanding the
> concept. I believe Jim Ault gave it a go too. Guess I'm hopeless!
> (smile) Thanks, maybe you've helped someone else.
- Have you ever found the need to create variables on-the-fly? Ones that are
not declared in your code? Rev arrays allow for this and custom properties
are "persistent" arrays that retain their values (provided you save the
stack) from one session to another. Array values are lost when the session
- Have you ever had the need to not write a stack to disk, usually for
security reasons? Since locked stacks stored in custom properties can be
launched only into memory and run, they are much harder to hack.
- Have you ever had the need to know when a variable changes in memory due
to a user initiated action? Custom properties allow for this.
- Do you use globals? Custom properties allow for the creation of on-the-fly
You probably use invisible fields and controls to store persistent
information in your stack. Custom properties, however, are a much more
sophisticated and flexible way to store information in your stack, because
any kind of information can be stored, it's in an array format, and you
don't have to create a bunch of invisible fields or other objects to hold
There are actually many more uses, and I personally don't know if I could
live without custom properties. ;-) The above are just a couple that don't
have to do with writing data to a disk stack.
Aloha from Hawaii,
More information about the use-livecode