[Golist] extending PlayableBase for simple action
Moses Gunesch
moses at goasap.org
Sun Jul 27 14:04:56 PDT 2008
On Jul 27, 2008, at 2:36 PM, rboyd at telematter.com wrote:
> Cool, that worked.
Great, I will commit that change! I will check the sequence classes
for similar issues.
Hey Jud or others who were writing callback classes, is this issue
going to maybe simplify that sort of thing as well? I guess anything
that happens instantly could now just happen in the start method
without problems.
> But, why aren't we doing the listenTo() in PlayableGroup#addChild?
We only want to actively listen to events on playing items.
Considering that everyone and their mom will be creating their own
playables their own way, there's not fixed guarantee that they won't
be dispatching events willy-nilly. To keep a tight reign on things,
since the utility starts the item, that's the best time to start
listening to its events.
> would shave a few extra cycles
Don't sweat it: Simultaneous groups are normally very small. The
listenTo() method is not terribly complex, but it does have code that
ensures that each child object is only ever listened to once so it can
keep an accurate count. Over all my leaning is toward the most
airtight system in this area, not performance.
I sort of treat utilities with a grain of salt since anyone can write
their own – the group & sequence classes shipped with Go are just
extras, provided for convenience.
- m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080727/e9ace132/attachment.html
More information about the GoList
mailing list