best way to open a script-only library stack?

J. Landman Gay jacque at hyperactivesw.com
Mon Sep 17 15:48:03 EDT 2018


On 9/17/18 12:49 PM, Curtis Ford via use-livecode wrote:
> I'm just getting started with the idea of a library stack for scripts, 
> and have a dopey question: what's the best way to edit the library as I 
> work on the project?
> 
> I've created a script-only stack and included
> 
> start using stack "myScriptStack.livecodescript"
> 
> in the preOpenStack handler of my main stack.
> 
> When I open the main stack, I don't see a way to get to the library 
> stack. So I open the library stack through 'recent files' in Livecode, 
> but then I see the message "A stack [library stack name] in file [path 
> to the main stack file] is already in memory. The LiveCode UI does not 
> distinguish stacks which have identical names, so editing these stack 
> files while both are in memory could result in data loss."
> 
> If this is a real concern, how do I get back to work on the library 
> stack? Any suggestions on best practices?

When you start using a script-only stack, LC creates a temporary hidden 
stack in RAM and assigns the script to it. It's there but not visible. 
If you try to open it again as a file, you get a conflict because the 
stack in RAM has no filename per se, so the engine sees it as a duplicate.

The stack should be listed in the Application Browser and probably the 
Project Browser (I didn't look) so you should be able to edit its script 
from there. But what I usually do is look in the "Stacks In Use" pane 
(last icon in the row) of the message box, where you can just click the 
blue rectangle to open the script.

Saving the script will rewrite it to the text file.

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




More information about the use-livecode mailing list