[Kss-devel] Cleanup of kss.core

Philipp von Weitershausen philipp at weitershausen.de
Mon Feb 5 23:05:17 CET 2007


Over the past two days I've been cleaning up some of kss.core. As a
consumer of kss.core you should only be affected by changes in the event
system. The semantics haven't changed, just the way you subscribe to
events. From the commit message:

   If a portlet or other provider of HTML content wants to be notified of
   changes, it should register an event subscriber for the object, the
   view and the event that describe the change.

   For example, if you'd like to know about object modified events of
   documents that occurred during any KSS view, register your subscriber
   like so:

   @adapter(IDocument, IKSSView, IObjectMOdifiedEvent)
   def reactToDocumentChangesInKSSViews(doc, view, event):  # order of
parameters described by @adapter line
       ... append to view's KSS commands here

Those changes have been made in the 'philikon-cleanup' branch of
kss.core. plone.app.kss and archetypes.kss as the only two consumers of
kss.core events known to me have been fixed up as well in their
'philikon-kss-cleanup' branches. All the tests pass (kss.core unit tests
now even pass on Zope 3!) and I think the branches are ready for
merging. However, this being my first Plone check-in in the last 4 years
(last time I worked on Plone it was the infamous 1.1 release :)), I'd
prefer if others would first give this code a spin. If you think it's
ready and works for you, please feel free to merge the branches.
Otherwise I'll be happy to do it after positive feedback.


-- 
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5



More information about the Kss-devel mailing list