[Q] doubleclickable and dragable morph: how?

Ned Konz ned at bike-nomad.com
Tue May 6 22:14:26 UTC 2003


On Tuesday 06 May 2003 06:52 am, Lex Spoon wrote:
> Ned Konz <ned at bike-nomad.com> wrote:
> > doubleClick: anEvent
> > 	"mouse is still down when this is called."
> >
> > 	[ anEvent hand lastEvent redButtonPressed ]
> > 		whileTrue: [ World doOneCycleNow  ].	"wait till button
> > released" self changeColor
>
> I wish people would find better solutions than calling doOneCycle. 
> It doesn't seem like a nice thing to do when Morphic is already in
> the middle of one cycle.  However, if it has to be done, it would
> be better to call doOneCycle instead of doOneCycleNow.

You're right. This particular problem can be fixed by just changing 
the state logic in the double click handling.

More generally, we see these kinds of hacks where people want modal 
dialogs. There's usually a way around modal dialogs, though it's 
usually more roundabout.

Can you suggest a more general way to let people who are writing 
cross-UI (MVC and Morphic) apps get the data they need without major 
restructurings?

Typical of these is:
* push a "save" button
* executes "save" code, but
* now we need to get a filename
* and if there's something wrong we want to tell the user

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



More information about the Squeak-dev mailing list