Revlet - how to get back to the main stack from a substack?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Wed Mar 23 10:14:13 EDT 2011


Hi Mark,
Thanks for the response and suggestions. 

According to the documentation, windowID generated by the underlying OS, applied to each new application window opened. So, opening a substack using 'go stack "<target substack name>" in the window of this stack' is the equivalent of opening a new web page in the same browser window - the windowID should stay the same.

To prove this logic, in the IDE on OSX, if I type 'answer the windowid of current stack' into the message box whilst focused on the main stack, I get a 9-digit number returned. If I then navigate to the substack using the '...in this window' statement and repeat the message box command, I get the same number. So, OSX has retained the windowID for the substack.

Once deployed to the revlet, the underlying OS sees only a single window, so outside the rev browser plugin, nothing changes. Meanwhile, within the revlet, I can move from main-stack to substacks and between substacks using this same command. So it should be possible to navigate back to the main stack in the same (or a similar) way.

So unless there is some undocumented secret syntax somewhere, this looks like a bug with the LiveCode browser plugin.
Best,
Keith..

On 23 Mar 2011, at 12:52, Mark Schonewille wrote:

> Hi Keith,
> 
> I don't know whether the ownership of the window actually changes, when you go to the substack. What happens if you try
> 
> go stack "Name of mainstack" in the window of stack "Name of mainstack"
> 
> (This might be completely wrong, but if everything else fails, just give it a try).
> 
> You'd have to read the docs for this, but perhaps it is also possible to store the window ID in a variable and use that to refer to the window, instead of "the window of me".





More information about the use-livecode mailing list