[TransWarp] input-driven application
Phillip J. Eby
pje at telecommunity.com
Thu May 15 17:26:41 EDT 2003
At 11:03 PM 5/15/03 +0300, alexander smishlajev wrote:
>i have composed a simple component:
>
>=== begin cut Echo.py ===
>
>
>==== end cut Echo.py ====
>
>and i tried to run it with 'peak import:Echo.Echo'.
>
>that did not do anything. where am i wrong?
You're not. There's a bug in the assembly events system, that's keeping
your component from registering with a task queue. For now, you can work
around it by adding:
self.uponAssembly()
to your 'run()' method, before invoking the mainloop. This is just a
temporary workaround until I figure out how to fix the problem with
assembly events. :(
What's happening is that if a component receives an assembly event before
its children request notification of assembly events, then when later
requests occur, it will simply add them to its notification queue and never
notify them. In order to fix this, I think I'm going to have to add
another state variable. At any rate, I'll need to add new tests to cover
this condition.
Attempting to use your code, I also discovered that I was a bit premature
in simplifying the utility registry code last week as well; as a result,
PEAK tries to use Twisted's reactor even when a simpler reactor is
sufficient. I'll need to fix this, too.
More information about the PEAK
mailing list