On 5 Jan 2006, at 12:05, yuppie wrote:
I can't find any code for purge="False".

This is only on the trunk. The _importNode methods of ActionCategoryNodeAdapter and ActionNodeAdapter look for an optional 'purge' attribute.

Ah ok, I had looked at CMF 1.6 only.

Workflow bindings don't need that attribute - they are always in update mode if self.environ.shouldPurge() is False. Maybe it would be better to make the shouldPurge setting the default for properties as well. And override it with purge="True" if necessary. Don't know.

On the other hand the object importer and the skins layer importer check insert-before and insert-after. I'll reuse that, even if in my use case the list order doesn't matter.
On second thought it's a bit different, for skins and objects insert-before and insert-after are attributes of the (equivalent of the) element itself, not the property... So I'll put them on the elements, and make update the default if purge is true, and add an optional purge="True" on the property if you really want to purge it in an extension profile.

And on third thought you implemented remove="True". I'm not married to 'purge', but

- we should be consistent for all kinds of sequences

- remove doesn't feel right. If I see
  <property name="lines2" remove="True">
  I expect this property will be removed, not just cleared.

- it actually overrides shouldPurge()

I'm ok with 'purge' too. I named it 'remove' because of the existing uses of that keyword, and of not finding any use of purge. And if you see:

 <property name="lines2" remove="True">
  <element value="Foo"/>

Then the behavior felt relatively natural: first remove, and then add what's here.

But ok with purge.

BTW: We should document these update directives somewhere. Originally all update directives were mentioned in CMFSetup/ PROFILES.txt. GenericSetup/PROFILES.txt no longer has a complete list because most update directives are CMF specific.

I also agree, I need to point my developers to a doc somewhere with these special directives.


Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to