Actually, thinking about it, the Sprite, being in the kernel, has no business trying to use a generic service like events. Each sprite implementation needs to use its own kernel services directly to do any eventing. I think that in most cases the sprite is just registering a timeout event, which should be simple to do.

On 2008-05-07, at 11:49 EDT, P T Withington wrote:

It really turns out that LzDelegate and LzEvent want their context's to be LzMiniNode's (because they want to look at __LZdeleted, __LZdeferDelegates, and _events). If all context's were LzMiniNodes (or LzEventable, as proposed yesterday), we could also implement automatic tracking of events and delegates so they won't leak when nodes are destroyed (eliminating the burden on every LZX class doing this for themselves).

I tried to enforce this, but run into trouble because Sprite's want to register themselves as delegates, but they are not mini nodes.

One thought: I create a superclass LzSimpleDelegate and LzSimpleEvent that work with any object and don't participate in the node protocol.

Any better ideas?

Reply via email to