[Zope-CMF] One CMF object as an attribute of another, and getTypeInfo()
Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Fri, 11 Jul 2003 18:55:40 -0400
Hello,
I just created a CMF object type that has as an attribute an instance =
of a
CMF Portal Image, and as far as loading the image and viweing it, =
everything
works great.
Then I realized I actually need to keep DC metadata on that image. The
metadata_edit_form actually works to look at it (Meaning the DC methods =
are
available), but I can't seem to edit it.
The metadata_edit script dies with:
AttributeError: 'None' object has no attribute 'getActionById'=20
'None' comes from the getTypeInfo method ... I'm now stuck trying to =
figure
out why that doesn't work, and how to fix it.
After reading the docstring for getTypeInfo in TypesTool, I tried =
adding the
portal_type attribute by doing something like "
self.featuredimage.portal_type =3D 'Portal Image' ", but that didn't =
help.
I saw this DynamicType class, which I suspect could help me, but I'm =
not
entirely sure what the best way is to go about this.
Anybody try this before, any ides/suggestions would be much =
appreciated!
Thanks,
Jean-Fran=E7ois Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410