Morphs differ based on how brought to life?

Dan Shafer dshafer at yahoo.com
Sun Mar 25 05:15:44 UTC 2001


--- Ned Konz <ned at bike-nomad.com> wrote:
> On Saturday 24 March 2001 20:27, Dan Shafer wrote:
> 
> > I declare success. Then I create a new ScorePlayerMorph from the New
> > Morph... menu, click the Close button. Error. ScorePlayerMorph doesn't
> > understand closePlayer!? 
> 
> Well, ScorePlayerMorph is a class, not an object. Is that the recipient of 
> closePlayer? If so, your button's target is set wrong (should be set to the 
> ScorePlayerMorph itself, not to its class).
> 
> 
> > 	r addMorphBack: (bb label: 'Close';			actionSelector: #closePlayer).
> 
> What did you set bb's target to? If you inspect it, and look at its target, 
> is it your Morph? Or is it ScorePlayerMorph (the class)?

It's an instance of ScorePlayerMorph. I set it (actually it was already set) in
the code to be scorePlayer. But that just triggered something. When I bring up
a halo on the ScorePlayerMorph I created in the Workspace, it's not a
ScorePlayerMorph but rather a ScorePlayer. And closer reading of the walkback
shows why I need to take a break from this sooner than I did. It's not the
ScorePlayerMorph that doesn't understand closePlayer, it's the ScorePlayer. Of
course, the ScorePlayer isn't a Morph, so "closing" it has no real meaning as
far as I can tell.

Back to the drawing board.
> -- 
> Ned Konz
> currently: Stanwood, WA
> email:     ned at bike-nomad.com
> homepage:  http://bike-nomad.com
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/





More information about the Squeak-dev mailing list