JUCE
JUCE copied to clipboard
Added an overload to sort a ValueTree using a lambda
This Pull Request adds an function overload to ValueTree sort, which takes a lambda, so that sorting of ValueTree children can be done in one line instead of creating an ElementComparator struct.
Unit Tests for numbers and strings are included.
Very nice. Perhaps something similar can be done for StringArray, ListBoxModel, etc., wherever a custom sort might be needed.
Very nice. Perhaps something similar can be done for StringArray, ListBoxModel, etc., wherever a custom sort might be needed.
Indeed, this would be possible. Good idea. juce::StringArray
just sits on top of juce::Array<juce::String>
and Array has a sort using a similar ElementComparator. So the templated variant I had before would be doable for juce::Array.
The ListBoxModel is abstract though, it is not really a container, so I think here it doesn't really apply.
Bump with backlink to the forum https://forum.juce.com/t/std-sort-on-juce-valuetree/52532/10
Anybody at juce?
At the moment, when not fixing critical bugs, we are focusing on major features:
- MIDI 2.0 support
- Improved unicode rendering
- Improved embedded webview support
Due to the limited size of the team we have to set our priorities carefully, so until JUCE 8 is released we're unlikely to add any features outside of these areas.
Thanks for the feedback