AW: [Zope3-dev] Re: unnamed local utility
Roger ineichen
dev at projekt01.ch
Fri May 14 17:10:58 EDT 2004
Garrett Smith wrote:
> You can leave the utility name empty when you reigster it.
> You can then
> look it up using:
>
> zapi.getUtility(context, IMyProvidedIface)
>
> In that call, name == '' by default.
>
> -- Garrett
Ok, thanks.
I tried some different registrations they worked,
but theres a bug in the registration framework.
You can try this if you register two
BrowserCookieIdManager, the second time you get a
UnpickleableError: Cannot pickle
<type 'zope.security._proxy._Proxy'> objects
I think there are a psecurity proxied object somewhere?
I don't know if this is known bug and it's a part of the next
release.
Regards
Roger
>
> Roger Ineichen wrote:
> > I need to make shure that a
> > utility is just available once in a site like a service.
> > This means it's a unnamed utility. Right?
> >
> > What should I do?
> > Do I have to write a service instead of a utility
> > for to make shure there is just one instance available in a site?
> >
> > Regards
> > Roger Ineichen
> > _____________________________
> > END OF MESSAGE
> >
> >
> > _______________________________________________
> > Zope3-dev mailing list
> > Zope3-dev at zope.org
> > Unsub:
> >
> http://mail.zope.org/mailman/options/zope3-> dev/zope-zope3-dev%40m.gman
> > e.org
> >
> >
>
>
>
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub:
> http://mail.zope.org/mailman/options/zope3-> dev/dev%40projekt01.ch
>
>
More information about the Zope3-dev
mailing list