the defaultStack changes on resume

Paul Dupuis paul at researchware.com
Wed Aug 9 12:53:25 EDT 2017


I have handlers like these also. I have multiple work-arounds. You can
use suspend and resume to preserve the defaultStack and restore it. Lots
of way to work-around. I am curious if others have seen this and whether
anyone ever found a reproducible recipe.

So you have seen this behavior? In what versions of LC? Did you ever
find a consistent recipe to reproduce it?


On 8/9/2017 12:41 PM, Bob Sneidar via use-livecode wrote:
> 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 lists.runrev.com> 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?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list