Message Box Result

Bill <[email protected]> Fri, 20 Jan 2006 11:54:56 -0500
Newsgroups gmane.lisp.clx.devel
Message-ID <[email protected]>
Can anyone explain to me how you get a Message Box dialog to return the 
user input?  

I create a window with a message and two buttons - ok and cancel.   I 
want to return to the calling function the button pressed by the user.

I have it written such that the button press is a callback to either an 
ok function or a  cancel function, each of which sets a global 
variable.    I then want to return the global variable to the original 
calling function.   Obviously, this doesn't work or I wouldn't be here.

Once the message box is exposed I either seem to loose my place in the 
calling function or it returns immediately, before the user has a chance 
to press a button.
If I add a loop waiting for the ok/cancel variable to be set, the loop 
works only so long and then stops and the program never calls the next line.

I'm sure I'm doing this all wrong.    But how do you do it?

Bill



_______________________________________________
Portable-clx mailing list
[email protected]
http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx
See http://www.cliki.net/clx for darcs URL(s)