On Fri, Jan 9, 2009 at 7:12 PM, Kao Cardoso Felix <[email protected]> wrote: > > I've just happen to notice that line 55 of scene.py, the third line of > this test inside the EventHandlerMixin class: > > if ( scene._handlers_enabled and > scene.is_running and > isinstance(child, cocos.layer.Layer) <----- > ): > > is there just to enforce that only Layer and it's subclasses can > handle events. This is probably by design, but is it really a good > thing? > > Some context: I was making a HandleNode class that would be used to > manipulate others nodes and my first intention was to make it handle > mouse events by itself. Since manipulated nodes are mainly sprites and > HandleNode is set as child to the note it manipulates it wouldn't make > much sense to make it a Layer. > > Maybe my approach is wrong from some point of view, but even if that's > true the idea of any CocosNode subclass (that also inherits from > EventHandlerMixin, of course) being able to handle events still > appeals to me. > It was by design, yes. But i think it was a mistake, and ive been about to remove that for some time, but never actually got to do it.
Lucio. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
