Modularising Code

Terence Heaford t.heaford at btinternet.com
Thu May 8 11:57:05 EDT 2014


My understanding is if you create a library of a stack it’s stack script is placed between the main stack that has called start using and LiveCode’s engine.

Is that correct?

If yes then I presume if you start using a substack then the substack script is placed between the main stack that has called start using and LiveCode’s engine

Is that correct?

If you only have handlers in the stack script of the substack then any messages will only call them after passing through the mainstacks script.

Is that correct?

If you actually use the substack as more than a repository for scripts then any control will pass the message through the substacks script to mainstack and onto the substack again.

Is that correct or once you start using the substack is it removed from the normal message passing and any control only passes to the substack script and onto the engine?

I hope the above is understandable.

All the best

Terry


On 8 May 2014, at 14:37, Dar Scott <dsc at swcp.com> wrote:

> Remember that the main stack is in the message path of the substack.  So, you will have the main stack twice in the message path for cards and controls.  This is probably fine.  But, something like a keystroke counter in the main stack might count them twice.  




More information about the Use-livecode mailing list