[BlueBream] IntId getObject not resolving to objects

Thierry Florac tflorac at ulthar.net
Wed Sep 15 01:36:58 EDT 2010


______________________________________________________________________
Le mardi 14 septembre,
  Jonah Crawford <jonah at microgridsystems.com> a écrit :

> I have a situation intids are not resolving back to the objects
> they're paired to:
> 
> using  -->  return getUtility(IIntIds).getObject(intid)
> 
> I get the following trace:
> 
> #id	1683701620
> #self	<zope.intid.IntIds object at 0x3632130>
> #
> #>>  return self.refs[id]()
> #TypeError: 'NamedGroup' object is not callable
> 
> I've read the IntIds class and double checked that its zcml
> implements IKeyReference.
> 
> In fact here is the zcml 
> 
> <class class=".channel.Channel">
>   <implements
>      interface="zope.annotation.interfaces.IAttributeAnnotatable"
>      />
>   <implements
>      interface="zope.container.interfaces.IContainer" 
>      />
>   <implements
>      interface="zope.keyreference.interfaces.IKeyReference"
>      />
>   <implements
>      interface="zope.keyreference.interfaces.IKeyReference"
>      />
> 
> I can access the utility and see the intid, reference pairs but any
> thoughts on what will make it resolve ? 
> 
> Are there any other implements I need in the zcml to make this work ?
______________________________________________________________________


Could you be more explicit about your "situation" ?

I thing you also have to include zope.app.keyreference ZCML file.
But I'm not sure at all if it is what's missing in your use case...

Regards,
Thierry


More information about the bluebream mailing list