Script Only Stacks and Script Locals

Monte Goulding monte at appisle.net
Fri Jul 15 21:12:09 EDT 2016


> On 15 Jul 2016, at 2:21 PM, Sannyasin Brahmanathaswami <brahma at hindu.org> wrote:
> 
> yet to be tested, but interested in caveats
> 
> assume script only stack(s)
> 
> script "backScriptOne" "  #saved text only as "backScriptOne.livecodescript"
> 
> with script locals:
> 
> local sMediaMetadata
> 
> # more functions
> # save to disk
> # call and insert into back script
> 
> am I correct that now "sMediaMetadata" is a live script local that is private to all functions in backscript?

Yes
> 
> i.e not a globals as such, but still available to any other stack commands or functions that may be inserted into back?
> 
> i.e. if we insert another lib
> 
> script "someBackScriptTwo"  #saved text only as "backScriptTwo.livecodescript"
> 
> will sMediaMetadata
> 
> be available for commands and functions in backScriptTwo.livecodescript

No

A script only stack is a script file that when loaded is represented by a stack object. It (and its script) behaves the same as any other stack other than no properties of it or objects on it are saved when you save it and it defaults to invisible.

I’m giving a talk on script only stacks at the conference if you are coming.

Cheers

Monte



More information about the use-livecode mailing list