There is a story in everything

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

There is a story in everything

Stéphane Ducasse
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
Reply | Threaded
Open this post in threaded view
|

Re: There is a story in everything

Sebastian Sastre-2
> Stef (once called by  Andreas R. "a random refactorer" which is  
> certainly not an insult anymore :)).

This is a perl. What are a refactorer if not a software agent of change?
best
sebastian


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project