[Q] FillInTheBlankMorph>>getUserResponse evil?

Ned Konz ned at bike-nomad.com
Fri May 10 19:02:17 UTC 2002


On Friday 10 May 2002 11:50 am, Ken Causey wrote:

> Maybe it's just me, but this seems evil and hacky.  However, I'm
> now in the position of needing a slightly more complex dialog and
> my code really wants to wait for the response before continuing. 
> Is this logic the current best choice for waiting for a response
> from the user?  I can't seem to come up with a better solution so
> far.

An alternative is to make a standalone dialog box that will signal a 
semaphore or put a response on a queue. Then you can test this in 
your Morph's step method.

You just have to keep track of what state you're in.

Or you could have the OK button on the dialog call back to a method in 
your main Morph that would continue processing.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list