[z3-five] using getToolByName in utility

Dennis Schulz d.schulz81 at gmx.net
Wed Jan 31 17:12:03 CET 2007


In the applychanges the object is still wrapped into acquisition correctly.
and gets passed to field.set(adapter,newvalue) with the right context.

In the set of the field the aq chain is ok as well
it calls then setattr(object, self.__name__, value)

now the set of the alchemist ValidatedProperty is invoked.
in the set method there the aq_chain is destroyed.

I dont know why the set is called without acquisition context.
So you see any way to change something here?

Dennis


yuppie escribió:
> Dennis Schulz wrote:
>> **No matter where I print context (all places that you suggested) , 
>> aq_base(context) it is always the same, only my object without 
>> acquisition chain:**
>>
>> <PurchaseRequisition at 3>
>> [<PurchaseRequisition at 3>]
>>
>>
>> I am using the applychanges of alchemist and the alchmist bind method.
>> Could this be the reason?
>
>>     * Module ore.alchemist.bind, line 53, in __set__
>
> __set__() is called with your object as argument. You have to figure 
> out why that object is not acquisition wrapped. AFAICS your code only 
> works if your object is wrapped in that place.
>
> HTH, Yuppie
>
>




More information about the z3-five mailing list