Re: [Zope3-Users] getUtilitiesFor without context

2007-01-10 Thread Tom Dossis
Tom Dossis wrote: > Florian Lindner wrote: >>> Use: >>> # work out what your site >>> hook.set(site) >> Mhh, the hook object does not exist, hooks does not have a attribute set. >> What >> object do you refer to? > > My apologies, should be: > > hooks.set(site) hooks.setSite(site) __

Re: [Zope3-Users] getUtilitiesFor without context

2007-01-10 Thread Tom Dossis
Florian Lindner wrote: > >> Use: >> # work out what your site >> hook.set(site) > > Mhh, the hook object does not exist, hooks does not have a attribute set. > What > object do you refer to? My apologies, should be: hooks.set(site) ___ Zope3

Re: [Zope3-Users] getUtilitiesFor without context

2007-01-10 Thread Florian Lindner
Am Mittwoch, 10. Januar 2007 22:14 schrieb Tom Dossis: > Florian Lindner wrote: > > Hello, > > I have some local utilites registered. Now I try to call them from a > > function that don't have a context: > > > > utils = getUtilitiesFor(INewsfeed) > > for i in utils: > > print "Utili

Re: [Zope3-Users] getUtilitiesFor without context

2007-01-10 Thread Tom Dossis
Florian Lindner wrote: > Hello, > I have some local utilites registered. Now I try to call them from a function > that don't have a context: > > utils = getUtilitiesFor(INewsfeed) > for i in utils: > print "Utility called:", i.__name__ > i.sendNotification() > > but that