the defaultStack changes on resume

Bob Sneidar bobsneidar at
Wed Aug 9 12:41:26 EDT 2017

BTW I worked around this by using my getParentStack() function. Here it is:

function getParentCard pObjectID
   put offset("card id", pObjectID) into tStartChar
   put char tStartChar to -1 of pObjectID into tCardID
   return tCardID
end getParentCard

function getParentStack pObjectID
    put wordOffset("stack", pObjectID) into tFirstWord
    put word tFirstWord to tFirstWord +1 of pObjectID into tParentStack
    return tParentStack
end getParentStack

NOTE: I only use single word stack names. This function will have to be reworked to account for multi-word stack names. Honestly though, if people would follow basic conventions about naming things, everything gets much simpler. 

Bob S

> On Aug 9, 2017, at 09:08 , Paul Dupuis via use-livecode <use-livecode at> wrote:
> Has any one run into the following situation in LiveCode standalones?
> In a multiple window application, the user has either a standard window
> or a modal dialog open (the topWindow which is also the defaultStack).
> They navigate to a 3rd party application and by some means back to the
> LC standalone and click a control in the topWindow (again either a
> standard window or dialog) and that window is NO LONGER the defaultStack
> so an execution error occurs on the first control referenced that is not
> fully qualified.
> Obviously, I can fix this by fully qualifying all my object references
> (i.e. instead of using fld "x", using fld "X" of stack "Y") but I am
> curious is anyone else has seen anything like this?

More information about the Use-livecode mailing list