Re:avatar subclasses

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

Re:avatar subclasses

David Faught
After playing with this a bit and trying to keep changes minimal, I
have decided that with one exception, maybe things aren't so bad.  The
one exception is that to minimize the impact of other changes, Howard
Stearns' changeSet from Mantis #4254 or something similar would be a
good idea.

So, to use my own avatar subclass I need to:

1.  subclass CroquetParticipant or one of its existing subclasses,
which I am probably doing anyway to override the #setup method.  In
the #setup method I need to specify the class name of my subclass of

2.  subclass CroquetHarness or one of its existing subclasses.  This
is kind of an extra step, but necessary to override the
#initializeAvatar method (introduced by Howard's changeset) to specify
the class name of my subclass of TAvatarUser.

3. subclass TAvatarUser or one of its existing subclasses.  This is
really what I want to do anyway.  In the #initialize method, in a
similar manner to TChattyAvatarUser for example, include the statement

  replicaClass := TChattyAvatarReplica.

only specify my new TAvatarReplica subclass instead of TChattyAvatarReplica.

4.  subclass TAvatarReplica or one of its existing subclasses.  I
probably really want to do this too.

The reason I decided that step 2 isn't so bad as opposed to my
original proposal is that there is no easy reference from
CroquetHarness back to the CroquetParticipant that instantiated it and
I didn't really want to add that for no good reason.  Except for
Howard's change, the rest is already in place.

So, at each step of this process, my new subclass is specified in a
single method but in a different way.  A little inconsistent, but not
too bad.