Start Using Question

David Burgun dburgun at dsl.pipex.com
Sun Apr 25 08:52:41 EDT 2004


Actually I think it is something to do with the Stack not being fully 
loaded or maybe fully initialized. Or it could be some interaction 
with the IDE, not sure, anyway I placed the code in the openCard 
handler and it seems ok, just worrying now that it won't get called 
normally cos the stack is usually hidden!

I will give it a try, but does anyone know if openCard gets called if 
the Stack is not visibe?

Your solution below looks interesting, I will try it.

The thing is that how do I know that the "start using" will be called 
BEFORE the go stack "xxx" is executed? This is just a dummy stack 
that is used to hold command functions and the menubar.

Cheers
Dave

>The problem might be that your Stack isn't loaded fully when you 
>initiate the command. Did you try to issue the command in a later 
>time, maybe like this (untested):
>
>on openStack
>   send doStartUsing to me in 2 seconds
>   pass openStack
>end openStack
>
>on doStartUsing
>   put the filename of this stack into myStackFileName
>   start using stack myStackFileName
>end doStartUsing
>
>On Samstag, Apr 24, 2004, at 18:33 Europe/Zurich, David Burgun wrote:
>
>>Hi All,
>>
>>I have this on the Stack Script:
>>
>>on openStack
>>
>>[pass open Stack]
>>put the filename of this stack into myStackFileName
>>
>>start using stack myStackFileName
>>[pass openStack]
>>end openStack
>>
>>When this executes I get an error saying this is no such stack. the 
>>lines inside the [] are lines that I tried in an effort to get it 
>>to work, but I but get the error. If I put the same script inside a 
>>button handler is works ok.
>>
>>I am loading substacks independantly with code like this:
>>
>>put the filename of this stack into myStackFileName
>>set itemdelimiter to "/"
>>put empty into last item of myStackFileName
>>put myStackFileName & "StackFile.rev" into  myStackFileName
>>
>>go to stack myStackFileName
>>
>>or
>>modal stack myStackFileName
>>
>>But I want the Stack I am moving to have access to the Stack Script 
>>of the calling script.
>>
>>In this case it's a test and I can put the "start using" in the 
>>button handler, but in the real app there will be no button and I 
>>just want to move directly to another Stack without any user 
>>intervention.
>>
>>So, my questions,
>>
>>should this work in the openStack Handler? If so what I am doing wrong?
>>
>>If not, where do I put these commands? I just want other stacks to 
>>have access to functions in the StackScript.
>>
>>Thanks a lot
>>Dave
>>_______________________________________________
>>use-revolution mailing list
>>use-revolution at lists.runrev.com
>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list