Ask/Answer sometimes losing defaultStack

Richard Gaskin ambassador at fourthworld.com
Thu Sep 25 15:08:05 EDT 2008


Éric Miclo wrote:
> Perhaps bug #5925 could be an example?

Thanks for the pointer.  That one's worth knowing about, but in my case 
these aren't sheets, just ask and answer used as non-sheet modal, and 
the issue I'm experiencing isn't related to printing.

Any one else see anything else like what I've described?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


>> Since v2.7 I've had some bug reports from my users which lead me to  
>> believe that the ask and answer dialogs aren't always returning the  
>> defaultStack to what it was before they were called. I've seen this  
>> a few times myself, in scripts that first call an ask or answer  
>> dialog, then in subsequent lines make references to objects in the  
>> stack that called those dialogs and I get an "object not found" error.
>>
>> In such cases I've found that this workaround fixes things:
>>
>>  put the defaultStack into tSaveStack
>>  ask "Whatever" with "OK"
>>  set the defaultStack to tSaveStack
>>  -- do more stuff...
>>
>> But I have a lot of code that calls ask and answer, so it isn't  
>> practical to add those lines to all of it.
>>
>> I'd submit this to the RQQC, but I haven't yet been able to create  
>> an isolated example, which leaves me with the possibility that I  
>> have something going on in these apps which is causing the problem  
>> rather than ask and answer.
>>
>> And for all I know, if this was an engine issue it may have been  
>> fixed in v3.  Rev 2.7 had a lot of changes to window layer handling  
>> in an attempt to clean up some modality issues, and those have been  
>> refined since but I haven't yet shipped a beta to my users with v3.0  
>> (and since the recipe is so elusive it's hard to say how long it  
>> would need to be in the wild before this shows itself anyway).
>>
>> So I'm checking in with you folks here to ask if any of you have  
>> seen anything like this, "object not found" errors after calling ask  
>> or answer.
>>
>> If so, have you been able to come up with a simple example to  
>> reproduce it?





More information about the use-livecode mailing list