|
Re: Morphic event-handling confusion: msg#00097lang.smalltalk.squeak.beginners
Max OrHai wrote: I'm trying to use Morphic, in Squeak 3.9, to make a very simple "physicsHi Max. Firstly, I might just make the point that Morphic is a pain to work with. I've often been at my wits end trying to work out what on earth it is doing and how to get it to behave. You're not the only one. I've just had a bit of a play around, and I think you'll want the following six methods in your Puck morph: handlesMouseDown: evt ^ true. mouseDown: evt Transcript show: 'Mouse down'; cr. handlesMouseStillDown: evt ^ true mouseStillDown: evt self position: evt hand position. handlesMouseUp: evt ^ true mouseUp: evt Transcript show: 'Mouse up'; cr. You can also define all the above methods using the "on:send:to:" mechanism if you want. Cheers, Michael.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Populate a new array., Michael van der Gulik |
|---|---|
| Next by Date: | Re: Populate a new array., Bert Freudenberg |
| Previous by Thread: | Morphic event-handling confusion, Max OrHai |
| Next by Thread: | Re: Morphic event-handling confusion, Bert Freudenberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |