After SmartReferenceStream, nothing surprises me :)  Seriously, debuggers in 
front of end users and centralizing all of the conversion methods in SRS 
itself, rather than with the class of the object being converted.

On the topic at hand, there is a lot of room to make clean use of events.  One 
thing to watch: Dolphin makes a point of introducing comparison policies, and 
has some "silent" setters (that do not trigger events).   I have long suspected 
that they are at least in part intended as a damping mechanism to avoid 
meltdowns that might have occurred in Dolphin's "youth."

Bill





________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Igor Stasenko 
[[email protected]]
Sent: Monday, July 11, 2011 9:24 PM
To: Pharo Development
Subject: [Pharo-project] MorphicModel needs serious cleaning

Just found that scrollbars are assigned 'slotname' when you creating them
and when it comes to send events to their model, it end up in this method:

use: cachedSelector orMakeModelSelectorFor: selectorBody in: selectorBlock
        | selector |
        model ifNil: [^ nil].
        cachedSelector ifNil:
                        ["Make up selector from slotname if any"
                        selector := (slotName ifNil: [selectorBody]
                                                                ifNotNil: 
[slotName , selectorBody]) asSymbol.
                        (model class canUnderstand: selector) ifFalse:
                                [(self confirm: 'Shall I compile a null 
response for'
                                                        , Character cr asString
                                                        , model class name , 
'>>' , selector)
                                                ifFalse: [self halt].
                                model class compile: (String streamContents:
                                                                [:s | selector 
keywords doWithIndex:
                                                                                
[:k :i | s nextPutAll: k , ' arg' , i printString].
                                                                s cr; 
nextPutAll: '"Automatically generated null response."'.
                                                                s cr; 
nextPutAll: '"Add code below for appropriate behavior..."'.])
                                                        classified: 'input 
events'
                                                        notifying: nil]]
                ifNotNil:
                        [selector := cachedSelector].
        ^ selectorBlock value: selector


this is incredible..

--
Best regards,
Igor Stasenko AKA sig.


Reply via email to