standalone loading script-only stacks

J. Landman Gay jacque at hyperactivesw.com
Fri Feb 19 01:01:44 EST 2016


On 2/18/2016 10:58 PM, Matt Maier wrote:
> The log works just fine in the IDE, but it doesn't start in the
> standalone...at least not right away. If I start poking at the controls the
> log might spontaneously start working for some reason.

The quickModeSetup handler has no "end" statement so it may not be 
compiling correctly. I'm guessing that poking other controls may call 
devLog (which does have the right structure) so that's why it works 
later. I'm not sure why it would work in the IDE though, I'd have 
thought it wouldn't.

The setupAsOf3FEB2016 handler also has no "end" statement.

>
> The real problem here is that the rest of this startup process is supposed
> to create a bunch of graph objects, but they're not appearing in the
> standalone.

The preOpenStack handler is using the path to the mainstack as the basis 
for determining where the other stacks are located:


>    set the defaultStack to "HowstrBeta"
>    set the itemDelimiter to "/"
>    get the effective fileName of this stack
>    set the defaultFolder to item 1 to -2 of it

Replace these four lines with:

    set the defaultfolder to specialFolderPath("resources")

Depending on the OS, standalone resources are copied to different 
locations outside the mainstack folder, and the original handler won't 
find them. You can always get their location with 
specialFolderPath("resources") which will always point to the right 
place. In the IDE, specialFolderPath("resources") points to the folder 
that contains the mainstack, which makes things easy; store the stacks 
in the same folder with the mainstack as you do now, and use 
specialFolderPath to find the stacks during both development and in a 
standalone.

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




More information about the use-livecode mailing list