Morphs and Players?
Ned Konz
ned at bike-nomad.com
Fri Nov 1 17:54:07 UTC 2002
On Friday 01 November 2002 09:23 am, David Faught wrote:
> I am trying to do a simple simulation based on Ned
> Konz' ConnectorMS changeset and having a terrible time
> of it. My problems are not so much because of the
> changeset as they are because of my not understanding
> how morphs and players relate to each other. I am
> trying to do some of this through the (player's?)
> viewer and some through code entered in the class
> browser and a workspace. I think that this is the way
> that I want things to work so that the finished
> simulation can be manipulated easily. Is there a nice
> tutorial somewhere that will help me out?
What are you trying to script? If you describe what you want to do, we
may be able to help you.
I haven't (yet) added any special support for scripting to Connectors
(BTW, you probably should consider getting the new version because it
has a better programmatic API, but I haven't yet posted a change set
to file on top of an existing image).
I asked on the list what kind of scripting support would be useful for
Connectors but didn't get any answers.
From the Player class comment (which I'm sure you've read, but this is
for other people reading this):
-----
The fundamental user-scriptable entity. Always represented by a
user-specific subclass of Player; instance vars and methods relate to
user-defined structures.
costume is a Morph, the primary morph I am currently wearing for
graphical display.
Scripts are defined in subclasses of Player. These are UniClasses.
Messages in scripts are sent to Players. A Player may delegate to its
costume, or to an object the costume suggests. Or, a Player may
designate some other object to receive the script messages it does
not understand. (see doesNotUnderstand:)
-----
If you look at the methods in Player, you'll see that most of them
delegate to their costume.
The connection the other way (user interaction with the costume
triggering its Player's scripts, for instance) is generally via event
handlers that are set by the Player.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|