Hi guys
I have fun cleaning this cool morph demos.
I can find pearl in the two sense of the term:
Cool morph pearls (this is why we should receover the examples)
and less cool coding sample.
Example
Object class>> launchPartVia: aSelector label: aString
"Obtain a morph by sending aSelector to self, and attach it to the
morphic hand. This provides a general protocol for parts bins"
| aMorph |
aMorph := self perform: aSelector.
aMorph setNameTo: (ActiveWorld unusedMorphNameLike: aString).
aMorph setProperty: #beFullyVisibleAfterDrop toValue: true.
aMorph openInHand
StickyPad class>> launchPartVia: aSelector label: aString
"Obtain a morph by sending aSelector to self, and attach it to the
morphic hand. This provides a general protocol for parts bins.
Overridden here so that all instances will be given the name, unlike
the prevailing convention for other object types"
| aMorph |
aMorph := self perform: aSelector.
aMorph setNameTo: self defaultNameStemForInstances. "i.e.,
circumvent uniqueness in this case"
aMorph setProperty: #beFullyVisibleAfterDrop toValue: true.
aMorph openInHand
May be a hook is missing :)
Stef (once called by Andreas R. "a random refactorer" which is
certainly not an insult anymore :)).
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project