[Zope-CMF] Re: GenericSetup list property purge
yuppie
y.2006_ at wcm-solutions.de
Tue Jan 17 10:43:24 EST 2006
Florent Guillaume wrote:
> On 17 Jan 2006, at 10:28, yuppie wrote:
>> The handlers for other sequences (like skin paths and object managers)
>> just add new sequence items if the item doesn't exist already.
>> Wouldn't that also work for list properties?
>
> Yes but other sequences have an implicit semantics which is that
> elements cannot appear twice. Whereas here for properties that are lists
> we don't know the underlying semantics. It could be desired or not to
> have an element present twice. Not in my use case admittedly, but you
> never know.
>
> Up to know I just added elements to the list, without removing identical
> ones already present.
>
> What I can do is, for now, make purge=False have the exact semantics
> than for skins or objects (remove the old element first if it exists),
> but we know that at some point we may have to extend that semantic to
> provide things like append="True" or append="always" and
> append="once"... We can probably avoid deciding that now.
Either we make sure that importing an extension profile twice doesn't
create duplicated settings. Or we support an append="always" mode. We
can't do both.
So I really hope we'll never have to extend the semantic in a way like that.
Cheers, Yuppie
More information about the Zope-CMF
mailing list