Am Mittwoch, 27. Dezember 2006 21:42 schrieb Jürgen Kartnaller:
> Florian Lindner wrote:
> > Am Mittwoch, 27. Dezember 2006 19:15 schrieb Jürgen Kartnaller:
> >> component.provideUtility for a global utility.
> >
> > I've found that.
> >
> >> See zope.component.interfaces.IComponentRegistrationConvenience
> >
> > Ok, for registering. But what to call for unregistering? (I have a global
> > utility)
>
> zope.component.getGlobalRegistry() implements IComponentRegistry
>
> >> Or for local utilities registered in a site manager you use the site
> >> manager :
> >>
> >> sm.registerUtility
> >> sm.unregisterUtility
> >>
> >> See zope.component.interfaces.IComponentRegistry
> >
> > Ok, there is the unregisterUtility function. Where do I get an object
> > implementing this interface?

I have done it this way now:

from zope import component
components = component.registry.Components()
components.registerUtility(self, INewsfeed, self.__name__)

(example from registry.txt from apidoc)

It works so far that no error is raised. But I wonder why the object is not 
shown as registered in the ZMI?

Thanks,

Florian
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to