[z3-five] using getToolByName in utility
yuppie
y.2007- at wcm-solutions.de
Wed Jan 31 18:14:40 CET 2007
Hi Dennis!
Dennis Schulz wrote:
> 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.
Acquisition isn't available in __setattr__ :(
CMFCalendar.browser.event (on SVN trunk) does something similar, but in
that case an adapter is used. The wrapped object is the context of the
adapter, not the adapter itself. So the aq_chain is not destroyed in
__setattr__.
> So you see any way to change something here?
No idea. (Besides using an adapter.) The 'tools as local utilities' work
currently done on CMF trunk will make this much easier. You no longer
need Acquisition to get the tool (=utility).
Cheers,
Yuppie
More information about the z3-five
mailing list