[squeak-dev] Re: Morphic
Sean P. DeNigris
sean at clipperadams.com
Fri Sep 24 22:07:38 UTC 2010
Hannes Hirzel-2 wrote:
>
>> I tried (one of these felt very satisfying):
>> * Morph>>on:send:to:, which sounded good, but never got called
>> * intercepting Morph>>processEvent:using: (which I was told was not a
>> good
>> idea)
>> * (after seeking help), locking the submorphs and overriding the dozen or
>> so
>> event-related methods in the chain from my morph to TextMorphForShout
>> (the
>> Morph that actually handles the text and input).
>> * subclassing TextMorphForShout and then subclassing PluggableShoutMorph
>> to
>> use that subclass.
>
> Which method did you like best?
>
Ha ha, should have been *none of these felt...*, but:
1. The on:send:to: was what I /wanted/ to do, with the downside being that
it did nothing, lol.
2. The intercept of Morph>>processEvent:using: was okay, but dangerous
because it's easy to lock the image when messing with this.
3 & 4. Lock&Forward and SubclassItAll were both okay, but seemed very heavy
weight for listening in on one event. IOW I may have gone that route
eventually if the behavior got complex, but didn't like being chained to it
for my simple case.
Hannes Hirzel-2 wrote:
>
> There are some notes on this issue at
> http://wiki.squeak.org/squeak/2477
> ( Eddie Cottongim writes: I know of three main ways to handle events
> in Morphic.......)
>
Yes, he mentions #1 and #4 and adds a fifth - your own EventHandler
Hannes Hirzel-2 wrote:
>
> Conclusion: It might be worthwile to find out more how Juan has pruned
> Morphic in Cuis and if it is still valuable for use, document that and
> put it to use in Squeak and Pharo.
>
Cool, I've started this as well. Let's keep the list posted if we come up
with anything.
Sean
p.s. #1 seems to be broken in Squeak and Pharo. I'm going to start another
thread.
--
View this message in context: http://forum.world.st/Morphic-tp2544185p2604529.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|