topstack empty?
Richard Gaskin
ambassador at fourthworld.com
Tue Jun 8 03:02:37 EDT 2004
MisterX wrote:
> Richard wrote:
>>>Under what circumstances should "the topstack" return empty?
> when the topstack is not there ;)
>
> If you open RR and dont open a stack (that is not a palette or modal)
> the topstack returns empty. Same behavior as with the selobj...
How are topstack and selectedObject related?
> naturally, if you try this, the topstack is
> stack "F:/mc/Revolution/components/tools/revmenubar.rev"
That's my point, and the source of the mystery: in order for the engine
to remain active it must always have one window open.
In the circumstance that gave rise to the question there are actually
several: one toplevel stack and five palette stacks. Normally I would
expect that the topstack would refer to the toplevel stack, and if that
were closed it would return the topmost palette stack. Yet in my
circumstance I have a script that checks "the long name of the topstack"
and it was causing errors so I had it put the topstack and it put empty.
Hmmmmm....
The more I think about this something occurs to me: the bug is
triggered when going between two toplevel stacks in the same window ("go
cd xxx of stack yyy in window of this stack"), and the script triggering
the error is in a preOpenStack handler. Maybe what's happening is that
since preOpenStack happens before the stack is drawn, yet the other
stack is effectively no longer in that window, so there is a window
which for that moment is in a sort of limbo, no longer belonging to that
stack that was there but without the next one being rendered into it.
Is that a bug? I so, what should one expect the topStack to return
under these circumstances, the stack that's been closed or the one that
hasn't opened yet?
A Zen koan in Transcript....
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode
mailing list