[Feature Request] ValueTree::setType


#1

For my app, i need a ValueTree::setType(Identifier id) function, to redefine the value tree type.


#2

are you sure? it seems to me that if the aspect of the node you’re treating as a ‘type’ is likely to change, it would be better suited to being a property instead.


#3

yes you are right, but in needed it for special case


#4

…somehow there are some name-inconsistencies in Value-Tree. For example getChildWithName() should be getChildWithType()


#5

Yeah… I’m not really sure about making that value changeable, I’d rather treat it as read-only, same way the tag is read-only in an XML element. You can always just use operator= to assign a new type to the ValueTree.

yes, you’re right there… I might change that next time I’m in a pedantic mood.