[Reality] Events causing stuff to happen to objects that receive them

Christopher Armstrong reality@twistedmatrix.com
Sat, 17 May 2003 16:42:41 -0400


(reality list: I gave a little intro to NewReality to exarkun last night,
and he asked about events causing stuff to happen to objects that receive
them explicitly. I said they couldn't, but here's my amendment)

Well, I was semi-wrong about events not being able to cause stuff to happen
to objects that receive them. See NewReality/reality/things.py, 
Movable.moveTo; Pretty much that entire method is just about finding who
receives the event and then calling some methods on them. It's long,
but some of it looks like it could be generalized.

So the event itself isn't exactly whacking the object, but the Action can 
find the event listeners and bang them around as much as it wants.

If you've got any questions about how that method works, ask away.


-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/