[Zope3-dev] events: getting the context of objects

Jean-Marc Orliaguet jmo at ita.chalmers.se
Fri May 20 06:31:25 EDT 2005


Stephan Richter wrote:

>On Friday 20 May 2005 06:15, Jean-Marc Orliaguet wrote:
>  
>
>>I want to get the location about created object through event
>>notifications, but there is never enough context (there  is "Not enough
>>context to determine location root", ...)
>>    
>>
>
>At the time an object is created it has no location, since it has not been 
>added to anything. You really want to listen to the ObjectAddedEvent, which 
>is triggered when an object is added to a container.
>
>Regards,
>Stephan
>  
>

and Roger Ineichen wrote:

>Hi Jean-Marc

>Created object don't have a ILocation.
>They have to be added first to a container.

>Use ObjectAddedEvent for get a object with a ILocation.

>Regards
>Roger Ineichen



Thanks! you saved me a lot of time!

/JM



More information about the Zope3-dev mailing list