On 12/07/10 01:42, Richard Jones wrote:
On 12/07/2010, at 10:34 AM, Martin O'Leary wrote:
I have to agree with Tristam here. The decorator approach to event
handling seems like a great idea at first, when writing simple demos
and one-off toy apps, but it's immensely fragile, and doesn't play
well in the context of a larger program. I'm intrigued that Richard
says he tends to use decorators more often than the alternatives - I
simply can't imagine using them in anything more complicated than a
one-file simple program.
Sheesh, if only you'd all told me how you felt about the decorators earlier ;-)

I still think it's a neat idea to explore simple ideas in pyglet space, and yes 
I do use it but mostly in smaller apps (toys, if you will) and I push instances 
with multiple handlers for larger apps.

Given that there's clearly a strong sentiment against the syntax, and I'm 
having trouble representing it in the quickref anyway, and I'm having trouble 
fitting it in, I've dropped it altogether.

Attached is the last version I'll do for a while - I need to do some other 
stuff :-)


     Richard

I agree that the push_handlers way is the way to go as it works all the time although I can see why you like decorators it confused the hell out of me when I first came to try and write a larger program.

Thanks for writing the quick ref though, it looks good and a bit easier than sieving through the main docs.

Adam.

--
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.

Reply via email to