Hi Joachim: if you figured out how to do it, it would be cool to write it down in the http://book.pharo-project.org/

let me know if you want to do it and I create an user for you

cheers

mariano

On Mon, May 24, 2010 at 9:29 AM, St�phane Ducasse <stephane.ducasse@inria.fr> wrote:
clone is depreacted.
On May 23, 2010, at 3:38 PM, Joachim Geidel wrote:

> Am 23.05.10 15:15 schrieb Igor Stasenko:
> > Do you really need to create a meta? > > If not , then you can do just: > > newClass := Rectangle clone. > newClass > � superclass: Rectangle; > � organization: nil; > � methodDict: MethodDictionary new.
> Unfortunately, this doesn�t solve the problem:
>
>> | newClass method |
>> newClass := Rectangle clone.
>> newClass
>> � superclass: Rectangle;
>> � organization: nil;
>> � methodDict: MethodDictionary new;
>> � setName: #MyRectangle.
>> newClass new class name. "--> #Rectangle"
>> newClass new class == newClass. "--> false"
>> method := (newClass compile: 'testGhost ^42'
>> � � � � classified: nil
>> � � � � notifying: nil
>> � � � � trailer: newClass defaultMethodTrailer
>> � � � � ifFail: [nil]) method.
>> newClass addSelectorSilently: #testGhost withMethod: method.
>> newClass canUnderstand: #testGhost. "--> true".
>> newClass new respondsTo: #testGhost. "--> false"
>> newClass new testGhost. "--> Message not understood, should answer 42"
>
> The problem is not the MetaClass (I do need it), but that the new class doesn�t create instances of itself, which I find very, very strange.
>
> Best regards,
> Joachim Geidel
> _______________________________________________
> Pharo-users mailing list
> Pharo-users@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
Pharo-users@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users