Quitting standalone, is this a bug?

Michael Binder runr at prismpole.com
Fri May 18 07:13:36 EDT 2007


Hi Jacqueline,

you wrote:
 > It might all come clear if you take a look at the dictionary
 > entries for  "topstack" and "defaultstack".

I have spent the night trying out your syntax and rereading
the dictionary.   First of all let me say that your approach:

 >> put the id of this card of stack "myApp" into thisCd

does work and I think it is a better approach than my "the recentcards"
approach.   Thanks for the big help.  Having reread the dictionary,
however, I am more convinced than ever your approach is a workaround
to a bug.  Let me explain:

Look up "this" in the dictionary:
    Use the this keyword to indicate the current card or
    current stack in an expression

Look up "current stack" in the dictionary:
     The stack that's being worked on, usually the active
     window. The current stack is specified by the
     defaultStack property.
     Also, the stack that contains the object whose script
     is currently executing.

Look up "defaultstack" in the dictionary:
     Revolution's message box and editing palettes set the
     defaultStack property to the value returned by the
     topStack function before performing a stack action.

Look up "topstack" in the dictionary:
     The topStack is the frontmost stack with the lowest mode.

By all of these definitions, in the simple example of myApp
(from my original post), "this stack" should have evaluated
to myApp.   At the time the quit command was issued myApp was
the topstack.  Even if rev puts up a dialog box, its mode
would not be lower than myApp, would it?  Therefore, myApp
should have remained the topstack after the quit command
was issued.

If myApp is the topstack, then myApp is the defaultstack.

If myApp is the defaultstack, then myApp is the current stack.

The dictionary (quoted above) also says that the "current
stack" is  the stack that contains the object whose script
is currently executing.  It was myApp's script that referred
to myApp as "this stack".

Thus: "this stack" should evaluate to myApp.

As I mentioned in a previous post, "this stack"  evaluates
differently in the development and standalone environments.

In the standalone environment "this stack" evaluates one way
after the first Quit request and a different way after the
second and subsequent Quit requests.

How could that not be a bug?

--Michael Binder (with bleary eyes)




More information about the use-livecode mailing list