On Saturday 21 February 2009, Roger Ineichen wrote:
I fixed a z3c.form issue where util.Manager keys and values get append more then one time by calling update more then once on widgets or actions.
For doing so, I implemented a UniqueOrderedKeys class for util.Manager._data_keys and a decorator which will prevent to override them. See z3c.form.util.py line: 120
Can you please review if this and let me know it this is compatible with our own z3c.form parts?
I would have simply cleared the entire manager upon update() again. Otherwise, how do you handle an item disappearing when update() is called again?
My motivation to deep into this is to find a better way how we use the update track. I think we should separate the update process into a setup and execute concept. I have the feeling, but could not really tell it right now, that we need to separate execute for prevent calling execute more then once during calling update.
I see what you are saying and I think you are right. However, a formal split may be enough. Could we not just set a flag called "wasExecuted"?
Update should get called more then once at least if it comes to calculate button/handler conditions. Because it's possible that an action execute call manipulates something which will change the button condition which we need to recalculate within an action update call.
Absolutely. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"