On 14 March 2010 14:40, stephane ducasse <[email protected]> wrote: > Igor > > I do not know (I'm dizzy after a couple of hours of bus) but > asMorph for me conveys the idea that we get a transformation of the receiver, > while if this is just to > change the model of a morph why not model: > Changing a model gives nothing:
morph := MyListMorph new. morph model: someModel. now, since my morph is a list, it assumes that someModel object implements a protocol, which allows to extract the items ( #size, #at: etc). The question is, what you would do, if you want to represent each item in a list as a morph, so instead of: strings := model items collect: [:each | each asString ]. you doing: subMorphs := model items collect: [:each | each asMorph ]. ... this gives you a freedom to pick any form how represent each item in a list, instead of bare strings. > > Stef > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
