Referencing a stack from a front script

Peter Haworth pete at mollysrevenge.com
Fri Apr 16 14:50:29 EDT 2010


My app inserts some front scripts from a separate .rev file, then  
calls a handler in the front script that needs to reference the  
application's .rev file, specifically to create a stack as a substack  
of the application's main stack if it doesn't already exist , then add  
several cards to it.

Up to now, the front scripts have been in the same .rev file as my app  
and the code to achieve the above worked fine. I have now broken them  
out into a separate code library .rev file and things don;t work  
correctly any more.

I've tried so many combinations of "this stack", the long name of this  
stack", etc that I've lost track of what happened with each of them,  
suffice it to say that none of them had the desired effect.  The .rev  
file holding the front scripts happens to have a stack with the same  
name as the stack I want to create in the application's .rev file and  
I have not been able to figure out how to have the check for the  
existence of this stack look in the app's .rev file instead of the  
front scripts .rev file.

In desperation, I created the stack in the app's .rev file in the IDE,  
but now how do I tell the create card command in the front script to  
put the new card into the stack in the app's .rev file - that command  
doesn't seem to have a way to name the stack you want to create the  
card in other than what is in the defaultStack and it appears  
defaultStack can only be set the a local stack name.

Thanks for any guidance!

Pete Haworth











More information about the use-livecode mailing list