Re: [frogs] Stepping into the code for nested properties

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Sorry, I preovously replyed only to Carl :)

I did some more investigation on the issue, and I think it all bolis
down simply to the fact that reverting a nested property will revert
it even if it was not overridden before.
Nested reverting works like this:
1) Get the first instance of the nested proeprty list
2) get the first instance of the eventual sublist of properties
3) find the first instance of the property
4) drop it

This works only assuming that you always have two copies (overridden
and original) of the property you are reverting in the very first
instance of it's parent list, with the overridden value in the head of
the list.
I think we can just modify nested_property_revert_alist() to prevent
it from dropping non-overridden values. We can simply check if we find
at least another copy of the property, so we can assume safely that
the first one we drop is the overridden one. If just only one copy is
found we can assume that it is the original, and not drop it.
What do you think about it? I made a slight mod
nested_property_revert_alist() and the idea seems to work, if you want
I can try to post a little patch :)

---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/