Modularising Code

J. Landman Gay jacque at
Fri May 9 14:04:02 EDT 2014

On 5/9/14, 1:49 AM, Terence Heaford wrote:
> Do you think it is better to use
> insert [the] script of object into {front | back}
> for modularising your code when the code is to be solely contained
> within your project?
> Is there a limit to the number of front and back scripts a project
> can have?
> Is there any downside to using front/back vs. substack vs. stack?

There is virtually no difference between the two methods as far as 
performance is concerned. The "insert" command allows more flexibility, 
since "start using" will only allow the stack script to be in the 
message path, where "insert" allows the script of any object. On the 
other hand, "start using" will send a "librarystack" message, where 
"insert" sends no messages. Sometimes those minor differences matter, so 
the setup of your own project will determine which one you choose. For 
example, if you want to use 5 library scripts but you don't want to add 
5 substacks to your project, you might choose instead to place 5 buttons 
on a single card somewhere and just insert their scripts into back.

The IDE has no limits. For standalones, the commercial version of LC has 
a limit of 10 stacks in use or backscripts, but since the community 
version has no limits, removing the limits from commercial is currently 
under consideration. The limits are left over from when there was no OSS 

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the Use-livecode mailing list