[squeak-dev] singleton?

Matthew Fulmer tapplek at gmail.com
Thu Apr 10 04:19:10 UTC 2008


On Wed, Apr 09, 2008 at 11:41:27PM -0400, Joseph T. Bore wrote:
>
> I would like to implement the following behavior, but im not sure how to 
> accomplish it:
>
> a method called plot, when its called, it would either create a new 
> PlotMorph or if one is already on screen, re-use the existing plot morph.
>
> I have the plot code working, but i cant figure out how to re-use the 
> existing morph.

(World findA: PlotMorph) ifNil: [PlotMorph new openInWorld; yourself]

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/



More information about the Squeak-dev mailing list