Seeing as how isSystemDefined is only false for subclasses of MorphicModel that ends in a number, I'd say so :)
Making a version of Etoys which runs on Pharo would be more difficult to achieve though. My 2c: Possibly forcing a rethinking of how to avoid saving auto- generated classes without hacking it into core methods, can't really be seen as a bad thing anyways... Cheers, Henry On Aug 11, 2009, at 4:44 48PM, Alexandre Bergel wrote: > Indeed. > So, is this a good candidate for more cleaning? If yes, I add an entry > in the wiki and I work on it now. > > Alexandre > > > On 11 Aug 2009, at 10:40, Henrik Johansen wrote: > >> Sounds a lot to me like something that could be a leftover from >> Etoys, >> f.ex. used to support auto-numbered, auto-generated morphs by a user, >> but avoid saving them to disk etc.´... >> >> Cheers, >> Henry >> >> On Aug 11, 2009, at 4:04 01PM, Alexandre Bergel wrote: >> >>> Dear List members, >>> >>> The following method is defined in Class: >>> -=-=-=-=-=-=-=-=-= >>> Class>>isSystemDefined >>> "Answer true if the receiver is a system-defined class, and not a >>> UniClass (an instance-specific lightweight class)" >>> >>> ^ self == self officialClass >>> -=-=-=-=-=-=-=-=-= >>> >>> isSystemDefined is sent a number of times. Especially by streams. I >>> guess that this determines what should be serialized what should >>> not. >>> >>> However, #officialClass has only two implementers: >>> >>> -=-=-=-=-=-=-=-=-= >>> Class>>officialClass >>> "I am not a UniClass. (See Player officialClass). Return the >>> class >>> you use to make new subclasses." >>> >>> ^ self >>> -=-=-=-=-=-=-=-=-= >>> >>> And slightly more surprising: >>> >>> -=-=-=-=-=-=-=-=-= >>> MorphicModel>>officialClass >>> "We want to make a new instance of the receiver, which is a >>> subclass >>> of MorphicModel. Answer who to make a new subclass of. Also used >>> to >>> tell if a given class is a UniClass, existing only for its single >>> instance." >>> >>> ^ self name last isDigit ifTrue: [MorphicModel] ifFalse: [self] >>> "MorphicModel7 can not have subclasses, but Slider and >>> SystemWindow >>> may" >>> -=-=-=-=-=-=-=-=-= >>> >>> There is a very strong smell for cleaning here. Apparently, most of >>> usage of #isSystemDefined could be replaced by #isBehavior >>> >>> Cheers, >>> Alexandre >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> Pharo-project@lists.gforge.inria.fr >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> _______________________________________________ >> Pharo-project mailing list >> Pharo-project@lists.gforge.inria.fr >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Pharo-project mailing list > Pharo-project@lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project