[Zope-CMF] Re: CMFUid

Charlie Clark charlie at begeistert.org
Tue Feb 12 11:39:40 EST 2008


Am 11.02.2008 um 10:36 schrieb Miles:

> Hi Charlie,
>
> Uids are wired up using the event machinery, so shouldn't need  
> changes to content classes.
>
> By default, uids are applied for all content with the IContentish  
> interface   so as long as AContentObject provides that interface, it  
> should get uids.  You can see this in event.zcml.
>
> Originally, the tools did not do this, so for BBB you also need to  
> check some properties in the annotation tool properties tab (I  
> think): 'assign on add' and 'assign on clone'.


Thanks for the explanation but I'm still struggling a bit. I don't  
understand event.zcml - do I need to confifure a subscriber for my  
object?

 >>> a = aContentObject.aFactory()
 >>> from Products.CMFCore.interfaces import IContentish
 >>> IContentish.providedBy(a)
True
 >>> a.getId()
''

so the object is not aware of a UID if it has one. Is this wrong way  
to create such an object or should I be asking Zope to give me the  
UID? If I do depend on Zope to generate a UID for me then how I do add  
them to a folder? I can't use invoke_folder because that expects both  
the type name and the id.

Guess it's back to perusing the books.

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the Zope-CMF mailing list