From ea3026fdfe6767ba733069dea9c798717c073260 Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 2 Aug 2015 16:14:42 +0100 Subject: [PATCH] Added some comments to ValueTree. --- modules/juce_data_structures/values/juce_ValueTree.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index 892f3023e0..168371fdcf 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -56,6 +56,11 @@ assertions if you try to do anything dangerous, but there are still plenty of ways it could go wrong. + Note that although the children in a tree have a fixed order, the properties are not + guaranteed to be stored in any particular order, so don't expect that a property's index + will correspond to the order in which the property was added, or that it will remain + constant when other properties are added or removed. + Listeners can be added to a ValueTree to be told when properies change and when nodes are added or removed. @@ -188,6 +193,9 @@ public: int getNumProperties() const; /** Returns the identifier of the property with a given index. + Note that properties are not guaranteed to be stored in any particular order, so don't + expect that the index will correspond to the order in which the property was added, or + that it will remain constant when other properties are added or removed. @see getNumProperties */ Identifier getPropertyName (int index) const;