[PEAK] Dispatch

Phillip J. Eby pje at telecommunity.com
Tue Mar 28 10:26:10 EST 2006


At 02:46 PM 3/28/2006 +0200, Alain Poirier wrote:
>Hi Phillip,
>
>Using RuleDispatch with Zope 2.x, I've got the problem that the
>'isinstance()' rule doesn't accept a Zope extension class.
>
>Do you think it could be possible to fix this problem ?

You need to define an adapter from ExtensionClass.ExtensionClass (I think 
that's the right type) to dispatch.interfaces.ICriterion.  The adapter you 
should use is dispatch.strategy.ClassCriterion.  Something like:

     protocols.declareAdapter(ClassCriterion, [ICriterion], [ExtensionClass])

Let me know if that doesn't fix it for you.




More information about the PEAK mailing list