On 11/30/07, sol <[EMAIL PROTECTED]> wrote: > > I have a situation where I do not think using pushing and popping of > event handlers is enough, instead I need to get the event handler > frame after a push and then remove the frame from the dispatchers > frame list at a later time. Just pushing and popping does not work > because I need the frames removed in an order that may not be the same > as when they were pushed. > > I have this currently implemented by the following sudo code: > > # add a set of handlers to the frame stack > dispatcher.push_handlers(handlers) > # get the created frame > eframe=dispatcher._event_stack[0] > > .... some time passes, maybe other event frames have been created > > #remove the event frame > dispatcher._event_stack.remove(eframe) > > This works fine, but it would be nice to be able to do this type of > thing without accessing 'primate' attributes like _event_stack. > > Would there be any harm is making the following changes to pyglet in > this area: > > 1) have push_handlers return the frame that was created > 2) have a 'remove_handlers' or such that takes a frame as an input and > removes that frame from the _event_stack.
Seems reasonable to me, I've added it to the 1.1 planned feature list. Thanks Alex. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" 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/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
