Re: Object created events
Rocky Burt <[email protected]> Wed, 27 Sep 2006 10:46:20 -0230
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <1159362977.5628.4.camel@localhost> |
--===============0782594092== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-AW+wOMwv+zqhXEIQVYDc" --=-AW+wOMwv+zqhXEIQVYDc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2006-26-09 at 22:03 +0100, Martin Aspeli wrote: > Thus, I'd like to add the following: >=20 > IObjectCreatedEvent > -- instance brought to life - fire from initializeArchetype() >=20 > IObjectModifiedEvent > -- any and all changes - fire from processForm() when the creation flag=20 > is False >=20 > IObjectInitializedEvent > -- first change - subclass of IObjectModifiedEvent - fire from=20 > processForm() when the creation flag is True >=20 > The current implementation fires IObjectCreatedEvent on the first change=20 > (where I'm proposing IObjectInitializedEvent) and IObjectModifiedEvent=20 > on subsequent edits (I wouldn't change this). We went ahead and removed the IObjectCreatedEvent call in AT and now it just fires IObjectModifiedEvent in all cases. The true tricky part here is to track down all the places where IObjectModifiedEvent should be called. processForm is one obvious place, but Alec and I were discussing... what about edit/update() ? And what about the other places I'm not thinking of. The reality is that none of these events should be fired within the content object itself (to maintain separation of concerns, etc) but since AT mixes the UI stuff into the content object so harshly we don't really have a choice. > I can change this, if people agree. Also, this is on 1.4 branch and 1.5=20 > branch - should we change both? Given what we have with AT right now, I believe these are good changes for 1.4. With 1.5 I'd love to see more work done to separate out these UI bits so that the firing of events could happen outside of the content object. But realizing that I don't have time to do this and probably no one else does... implementing the same changes to be done for 1.4 in 1.5 would be the best compromise. So... +1 on including changes in 1.4. *If* we don't have time to separate out UI bits for 1.5, +1 for including changes in 1.5. Otherwise, we need to fix 1.5 UI bits ;) - Rocky --=20 Rocky Burt ServerZen Software -- http://www.serverzen.com News About The Server (blog) -- http://www.serverzen.net --=-AW+wOMwv+zqhXEIQVYDc Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBFGnmh1PysfgyHvo0RAvyjAKCO3lzls+6d4kSqT5Uk3hnKOAYZ1wCePkOy JQjChcIpoIM9Ay3kvdaFYuk= =6+6r -----END PGP SIGNATURE----- --=-AW+wOMwv+zqhXEIQVYDc-- --===============0782594092== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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 --===============0782594092== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Archetypes-devel mailing list Archetypes-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/archetypes-devel --===============0782594092==--