How to store a stack in a custom property

Joe Lewis Wilkins pepetoo at cox.net
Sun Apr 26 23:36:03 EDT 2009


Thanks Sarah.

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.

Joe Wilkins

On Apr 26, 2009, at 8:08 PM, Sarah Reichelt wrote:

> On Mon, Apr 27, 2009 at 11:55 AM, Joe Lewis Wilkins  
> <pepetoo at cox.net> wrote:
>> OK, now under what circumstances might we want to store a stack in  
>> either a
>> Custom Property or a Var? These aren't things we'd want or have to  
>> do in HC.
>> At least I never did in the many hundreds of stacks I created and  
>> used.
>> There must be some sort of unique things that can be done under these
>> circumstances that cannot be done with "ordinary" stacks, but still  
>> not
>> having adopted CPs, they are just not obvious to me. TIA,
>
> One possibility is a document based app, where you need to create a
> new stack every time the user wants a new document.
> You store a template stack in a custom property and spit it out  
> whenever needed.
>
> Another idea is for saving data or settings. Since you cannot save
> directly to the standalone (unless you have separate sub-stacks), you
> could have a prefs stack stored in a CP. When you launch the app,
> check if the stackfile exists and if so, read the settings from it. If
> it doesn't exist, create one with default settings from your custom
> property.
>
> Cheers,
> Sarah




More information about the use-livecode mailing list