Difference between Mainstack and Substack
Graham Samuel
livfoss at mac.com
Thu Jan 10 17:17:09 EST 2013
Yes, sorry for the confusion: but I think those separated stacks can still access handlers in the main stack directly, can't they? Or have I got this wrong as well?
Graham
On 10 Jan 2013, at 20:05, J. Landman Gay wrote:
> On 1/10/13 8:31 AM, Graham Samuel wrote:
>
>> Another very important use of substacks is to allow them (or the data
>> in them) to be changed by the user. In all modern operating systems,
>> self-modifying programs are forbidden, which means if the user
>> changes (say) some fields in your mainstack, when the app finishes
>> those changes can't be preserved unless the app intervenes and puts
>> the changes in a file somewhere. From the OS's point of view, one can
>> prepare a standalone program as just a mainstack, with substacks
>> outside it (this is the 'splashscreen' method). In this structure
>> there is no restriction on modifying a substack and just saving it as
>> a whole whenever you want to preserve the changes.
>
> True, but once the stacks are saved as separate files, they are no longer "substacks". There's been some confusion in the past with the terminology so just to clarify: a "substack" is a stack that has been saved in the same file on disk as the mainstack. If the mainstack is compiled into an app, its substacks also cannot save data to themselves.
>
> The standalone builder has an option to remove the substacks from the mainstack and save them out as separate files. That way those files can be opened by the app, altered and saved. However, at that point they are not substacks any more, they are mainstacks. I call them "document stacks" or "satellite stacks", or even just "stacks", but I try not to call them "substacks" to avoid confusion.
>
> Picky point I know, but it can throw new users.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list