Advice on: sharing data between stacks
Emilio Gagliardi
emilio at ualberta.ca
Mon Jun 6 19:08:06 EDT 2005
Emilio Gagliardi wrote:
> >The user selects some child
> >directory (modifying defaultfolders) which contains a custom stack
> >for performing some function.
>why modify defaultfolder ?
to make opening files easier. The way I envisioned this application
is that if it is placed at the top level folder that contains many
possible sub stacks in the descendent folders as my previous example
demonstrated. The user then navigates a particular folder. I
figured if I modified defaultfolder to reflect the sub stack the user
wants to use, it would be easier to do operations in that folder
across both stacks.
>>You could simply put the "write to disk" handler in the main
stack, and
>>then it would be available from within each of the other stacks.
Thank you! I didn't know handlers were available across stacks. That
is what i've done.
> >Here is how I envision the usage
>>
>> /Disk/Parent/GenericStack.rev
> >1) user selects a directory
> >2) directory contains another stack (ex. load great grandchild 2)
>This sounds like you'll (potentially) finish up with a custom stack
for
>each child (or grandchild)
Correct.
>I'd worry this could lead to code
>duplication between all these stacks. Could you not simply store data
>specific to that child, with a central set of custom stacks for
>different categories.
I'm not sure I understand what you mean by central set of custom stacks.
Yes there will be duplication but that is fine, so long as the
demographic data is passed correctly to the sub stack and the sub
stack correctly passes out the data to write to file. The reason
this is necessary is because we need to write the sub stacks very
quickly and usually with a very restricted range of functionality
that is independent of all other sub stacks. further, not everyone
who creates the sub stacks is a serious programmer so i wanted a
system that is flexible and loose.
Thank you for the URL to the handler hierarchy, I will go through it.
Cheers,
Emilio
More information about the use-livecode
mailing list