Modularising Code

Dar Scott dsc at swcp.com
Thu May 8 08:55:49 EDT 2014


Stack libraries have some nice advantages for me.  I sometimes put some things such as tables into controls.  They are often wrappers for externals.  (Or maybe the externals are helpers for the libraries.)

If you have a card for putting odd things and the card never shows, you might want to put some objects there to represent your modules and put the scripts into those.  Name them after the modules.  put them in front or in back as seems right when you open your stack.

If you need some module only on cards with certain background groups, then consider whether those scripts belong in the group.

If you have a family of applications that use the same splash-screen main stack, consider putting those things that are special to the family in that stack.

Dar Scott
Controls, Libraries and Externals

On May 8, 2014, at 5:28 AM, Terence Heaford <t.heaford at btinternet.com> wrote:

> I have been reading up on Library Stacks but in this instance I do not feel this is the solution I require.
> 
> I have a Project that needs access to a SQLite database and has many calls into that database from functions and commands which at the moment I have placed in the mainstack script.
> 
> In order to make the script more manageable I would like to have the SQLite scripts modularised and separate from any other scripts in the mainstack which I also may wish to modularise at some point.
> 
> I have placed all these scripts together in the mainstack to allow them to be easily called from all other parts of the project and to have easy access to user properties of the mainstack.
> 
> What is the best way to achieve this type of modularisation within the LiveCode IDE?
> 
> All the best
> 
> Terry
> _______________________________________________
> 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