asynchronous messages and answer dialog

Brian Yennie briany at qldlearning.com
Thu Mar 18 13:34:12 EST 2004


I suppose you would argue that:

"If there is a window named x then x must be one of the windows"

I agree, the english assertions seem to be inconsistent if the above 
can be false =)

I guess it would be clearer if the global property was something like 
"the openWindows"?
Or... if the behavior of "there is  a window" was changed to mean 
"there is an (open) window"?

Backtracking a bit to the original problem of the answer dialog, you 
might consider borrowing a general technique from multi-threaded / 
multi-process apps: use a locking mechanism.

on myAnswer x
     global isLocked
     wait until (isLocked <> TRUE) with messages
     put TRUE into isLocked
     answer x
     put FALSE into isLocked
end myAnswer

This off the top of my head, but the idea is that for as long as the 
answer dialog is presented using this wrapper, you can't open another 
one until it is dismissed.

- Brian

> Just to be very clear here.  In my opinion:
>
> x is among the lines of the windows
>
> ... and...
>
> there is a window x
>
> .... should be synonymous for purposes of checking for existence of 
> window x.  This is not the case at the moment.



More information about the use-livecode mailing list