Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an overload to sort a ValueTree using a lambda #1101

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ffAudio
Copy link
Contributor

@ffAudio ffAudio commented Aug 9, 2022

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.

@reFX-Mike
Copy link

Very nice. Perhaps something similar can be done for StringArray, ListBoxModel, etc., wherever a custom sort might be needed.

@ffAudio
Copy link
Contributor Author

ffAudio commented Aug 28, 2022

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.

@ffAudio
Copy link
Contributor Author

ffAudio commented Dec 5, 2022

Bump with backlink to the forum
https://forum.juce.com/t/std-sort-on-juce-valuetree/52532/10

@ffAudio
Copy link
Contributor Author

ffAudio commented Aug 15, 2023

Anybody at juce?

@reuk
Copy link
Member

reuk commented Aug 15, 2023

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.

@ffAudio
Copy link
Contributor Author

ffAudio commented Aug 15, 2023

Thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants