I'm realizing that the second approach (creating an empty class and filling it up) does not help to really curve out functionality since sometimes you cannot exercise easily On Mar 2, 2009, at 12:24 PM, Stéphane Ducasse wrote:
Now I get something somehow working with
copyMethod: sel from: aClass
| category | Transcript show: 'Does not understand ', sel asString ; cr. category := (aClass organization categoryOfElement: sel). self class compile: (aClass sourceCodeAt: sel) classified: category. Transcript show: 'recompiled', sel asString ; cr.
doesNotUnderstand: aMessage
| sel | sel := aMessage selector. (Morph selectors includes: sel) ifTrue: [^ self copyMethod: sel from: Morph]. (Object selectors includes: sel) ifTrue: [ self copyMethod: sel from: Object]. ^ aMessage sentTo: self.
I still would like to understand why the previous approach (alain- based) does not work with Morph so I will continue my little journey.
stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project