Help: script works fine in dev not in standalone

Sarah Reichelt sarahr at genesearch.com.au
Tue Jun 14 18:10:36 EDT 2005


> I've run into a weird problem I'm not sure how to search the  
> archives for.
> I have a parent stack that loads a sub stack.  I need to have data  
> pass between them so I used the following command to open the child  
> from the parent:
>
> go to stack "/root/folder/child_stack.rev" as toplevel
>
> In development mode, this code works fine and the code in  
> child_stack.rev runs as expected.  However, when I compile  
> these .REV files to standalone apps, the code in the child_stack  
> doesn't work.
>
> The code in the child_stack is simple.  I create a set of buttons  
> with mouseMove/mouseUp commands so that they can be dragged around  
> the screen.  I'm attaching the code in the buttons if that helps.   
> The behavior in standalone mode is that everything is visible, but  
> the mouseMove doesn't seem to fire.  Also, the ctrl+shift+option  
> key command doesn't seem to work either.

Does this rely on scripts that are in the parent stack? If so, you  
may need to:
     start using stack "Parent"
so that it's scripts are available to the child stack(s).
>
> I guess this leads to a more general question, one that i asked a  
> few days ago, but obviously didn't quite figure out, and that is, I  
> need an application to load sub stacks.  I need the sub stack to  
> perform some non-interruptible task, and then pass control back to  
> the parent stack.  They need to share data.  is it silly to compile  
> the parent stack and leave all sub stacks as .rev files?

NO, I don't think it is silly to do it this way as it makes updating  
very easy. I have a major application that hasn't been re-built for  
about 10 months, but it has about 20 separate sub-stacks that have  
had numerous updates. However, you may wish to make the stack opening  
stack very simple. Just give it a single button that asks for a stack  
and opens it. Then have your next stack file have 2 stacks, with the  
mainStack opening one of it's own substacks as a modal dialog.

HTH,
Sarah



More information about the use-livecode mailing list