Comment on Event in gaeutilities

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 19, 2009, 12:53:01 PM9/19/09
to appengine...@googlegroups.com
Comment by gramki:

Isn't this strange to have arguments in subscribe and to have in
fire_event? Usually the callback would be interested in the
state/additional info about the event when fired, not when subscribed right?


For more information:
http://code.google.com/p/gaeutilities/wiki/Event

codesite...@google.com

unread,
Sep 19, 2009, 3:42:45 PM9/19/09
to appengine...@googlegroups.com
Comment by bowman.joseph:

fire_event is basically a hook, I guess that might be another way of
thinking of the event system. Coming from a primarily javascript background
at the time I wrote this, I perhaps should have called this hooks, instead
of event.

What you do is you place fire_event in your application where you might
want to hook into later. When the event is fired it looks for callbacks
subscribed to it, and runs them. This is why the arguments exist on
subscribe, fire_event is nothing more than the utility that launches them

codesite...@google.com

unread,
Sep 19, 2009, 3:46:45 PM9/19/09
to appengine...@googlegroups.com
Comment by bowman.joseph:

As I'm working towards the next release, I'll try to improve the docstring
to spell this out better, which will also replace the content of this page
when I'm done.

Reply all
Reply to author
Forward
0 new messages