Re: Object created events

"Kapil Thangavelu" <k_vertigo-5YxZ1of64+Pk/[email protected]> Wed, 27 Sep 2006 17:31:18 -0700
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Organization ObjectRealms, LLC
Message-ID <[email protected]>
On Wed, 27 Sep 2006 09:28:43 -0700, Martin Aspeli <[email protected]> wrote:

> Kapil Thangavelu wrote:

>> if we want to move to z3 concepts, i'm not sure thats its a good idea to
>> have a divergent concept here of the same name, ie. createdevent, which  
>> in
>> z3 is typically sans context (ie unattached ), and here we would take it
>> to mean attached and fired from initializeArchetype, ie. a lot of
>> lifecycle stuff has already happens between object instantion, adding to
>> the graph (firing add events), and getting an objectcreatedevent in that
>> case. i think it might be better to just choose a separate name to  
>> denote
>> the event.
>>
>> so instead a separate ObjectAttachedEvent for initializeArchetype, and
>> have the factory do ObjectCreatedEvent.
>>
>
> Where exactly would the created-event be fired? __init__()?  
> createObject.py?

i was thinking the autogenerated factory/constructor stuff in at tool,  
custom factories would need to be updated if they wanted to generate this  
event.

createobject script never sees the object till after its been added.

-kapil

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV