Hi Robin,

repoze.folder uses zope.component to send events. Don't take my word
but I think that in order to catch those events you would need to set
your pyramid application to use zope.component.
http://docs.pylonsproject.org/projects/pyramid/1.0/narr/zca.html#enabling-the-zca-global-api-by-using-the-zca-global-registry

Alternatively you could create your own event and send it explicitly
whenever you add something to the folder. I don't know how to make
custom pyramid events, but it shouldn't be too difficult.

-- 
Danny Navarro  |  http://dannynavarro.net


On Fri, Jun 10, 2011 at 2:09 PM, Robin Harms Oredsson
<[email protected]> wrote:
> Hi all,
>
> I'm having some trouble with regular Zope events in Pyramid. We've
> used repoze.folder which basically fires off regular objectEventNotify
> when something happends. As far as i can see, the pyramid subscriber
> doesn't catch them.
>
> Here's an example:
>
> from repoze.folder.interfaces import IObjectAddedEvent
> from pyramid.events import subscriber
>
> @subscriber(IObjectAddedEvent)
> def do_stuff(event):
>    ...
>
> When i add something to a repoze folder, it uses Zopes
> objectEventNotify to add the new event. That isn't caught. If i use
> the registered notify method on registry it works as expected. Is this
> by design or am I doing something wrong here?
>
> I'd really appreciate some hints in the right direction.
>
> Cheers,
> Robin
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to