[squeak-dev] Re: Etoys Tiles (Bert Freudenberg)

Matthew Fulmer tapplek at gmail.com
Mon Sep 22 20:23:38 UTC 2008


On Mon, Sep 22, 2008 at 07:57:32PM +0200, kemal asad-syed wrote:
> the issue I have with  adding code to the "general" class player , is for
> maintenance to  package of my Special Purpose Morph, I need to add a
> dependency to my modifications on the player .maybe if my Morph or its
> packaging can dynamically add the needed methods to the player that could
> work for me . which bring me a second problem now .How can I add with code a
> method to a class .lets say i want to add the following code to the player
> class.
> 
> Plyrmethod
>     "wrapper need on the player to implement a method for My specialized
> Morph"
> 
>     |  |
>     costume MyMorphmethod .
> 
> I am also looking for a way to walk thru the list of the methods of a class
> .
> Thanks.
> Kemal

Monticello supports extension methods to external classes. So,
to add a method to class Player and put it in package MyPackage,
create the method category *MyPackage and put Plyrmethod in that
category. From then on, MC will zip up that extension method
whenever you save the package, and load it on installation

Of course, I don't know if that means anything since Etoys seems
to be developed using changesets and not Monticello. Changesets
can handle extension methods too

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/



More information about the Squeak-dev mailing list