[Zope-dev] Can't paste CatalogAware object
Itamar Shtull-Trauring
itamars@ibm.net
Thu, 06 Jan 2000 17:47:01 +0200
Itamar Shtull-Trauring wrote:
>
> I have a ZClass that inherits (indirectly thorugh a python class) from
> CatalogAware.
>
> I cut an instance, then paste it. I get the following error (2.1.0 and
> 2.1.1):
>
> Error Type: AttributeError
> Error Value: aq_acquire
>
So I implemented absolute_url in my python base class with the call to
aq_parent.absolute_url done with relative=1 instead of just passing
relative. Why does OFS.Application.Application call aq_acquire if it
doesn't inherit from Acquisiton.Explicit?
This solves this problem, but I get another one.
In CatalogAwareness, in the url function, there is a call to
self.REQUEST['SCRIPT_NAME'] - but I get an error saying REQUEST doesn't
exist. How the hell does Zope decide when you have access to self.REQUEST
and when you don't? I can't seem to find any way to tell when it'll work or
not.
--
Itamar S.T. itamars@ibm.net