[TransWarp] input-driven application - assembling filters

alexander smishlajev alex at ank-sia.com
Fri May 16 15:17:56 EDT 2003


Phillip J. Eby wrote:
> 
>>     def uponAssembly(self):
>>         super(Echo2, self).uponAssembly()
>>         _pipe = self.pipe
> 
> Please don't do this.  It isn't safe to override 'uponAssembly()' and 
> call it with 'super()'.  The standard way to capture an assembly event is:
> 
>     def setupPipe(self,d,a):
>         #....
> 
>     setupPipe = binding.whenAssembled(setupPipe)

> Also, note that if you use the most-updated CVS version of PEAK, your 
> run() method will not need to call 'uponAssembly()', as it will be 
> called automatically for you, well before your run() method gets called.


>> this module works ok, but i think that there may be a better way to 
>> connect inner filters together.  right?
> 
> It depends on what you mean by "better".  :)  What did you have in mind?

you have already answered the question: better way is to use 
whenAssembled() instead of uponAssembly() and not to call the procedure 
explicitely.  thank you.

best wishes,
alex.





More information about the PEAK mailing list