March 2, 2009
11:24 a.m.
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