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
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to