Initializing Libraries

J. Landman Gay jacque at hyperactivesw.com
Sat Jul 23 17:29:37 EDT 2016


On 7/23/2016 4:04 PM, Sannyasin Brahmanathaswami wrote:
> ) if the extension of the text only stack is ".livecode" then you can
> boot that into the IDE or use GO or "start using"
>
> but if you use ".livecodescript" as the extension. then you can't
> actually open it in the IDE by double clicking.
>
> I not that the livecode IDE uses ".livecodescript" for behaviors
>
> is there a best practices concept here that may help us?  What has
> the team discovered and "why"

This is an OS association. On Mac, use the Get Info window on any 
livecodescript stack and "open with" the version of LC you're using. 
Click the checkbox to apply that association to all files of that type.

> 2)
>
> we are doing stuff like this now… I think this maybe  creating
> problems, the thought was, the "someTextOnlyStack.livecode" should be
> brought into ram by "Go" and only then can you insert it into the
> back or frontscript. From my review of the RevIDE stacks… I think
> this may be a misconception… OTOH: this does open those stacks in the
> IDE if you like to edit there…

Any reference to "stack" will load it into RAM, you don't need "go". 
File paths to stacks act like containers, just like any other stack. You 
can do anything to the file path that you can do with a stack that is 
already in RAM; the action will load the stack before applying the action.

You're already doing this for "start using". You can do the same for 
behaviors, front and back scripts, etc.:

insert the script of stack tStackPath into front
set the behavior of btn x to the long ID of stack tStackPath
start using stack tStackPath
get the cMyProp of stack tStackPath

Your example handler mentions that behaviors are loaded but not applied. 
In that case you can avoid "go" by just getting any property of the 
stack, like it's short name, which will load it into RAM but not place 
it into the message path:

get the short name of stack tStackPath -- loads the stack into RAM

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list