NUM_API_FUNCTION_SLOTS
-
Could I just increase the limit, or is that a bad idea?
-
Bump bump
-
Hmm, the problem is that there are a few performance implications of having a large number of API calls per class, so we can't raise that number indefinitely so at some point we might think about breaking the Engine class down into multiple smaller classes. However this will completely break all existing code, so it's not an option unless we add an automatic migration tool.
Nevertheless, problem of future chris. Raise it!
-
@Christoph-Hart All of the functions I'm adding are to make the custom settings panel options available via scripting. So maybe a Settings class would be the answer?
-
Yeah, that's better. Do you know how to add an API class?
-
@Christoph-Hart I don't but I don't mind learning, can you point me to the documentation?
-
Yeah, the documentation :)
I've added the setting API class as template, so you can populate it with the stuff you need.
https://github.com/christophhart/HISE/commit/c61759fa260dcbda57da56631f5c8d1a18e32416
Also this commit is now the documentation for how to add a new API class :)
-
@Christoph-Hart Excellent, thank you
-
I've added a bunch of functions to the new Settings class. These functions make most of the custom settings options accessible from the API and also a few of the MIDI panel functions like toggling filtered channels and input devices. Pull request has been made.
I have an older HISE preset that throws a function doesn't exist error when I use any function in the Settings class. It works fine in new HISE presets in the same project. How do I update my older HISE preset to be aware of the new functions?
Update: It only happens in the main interface script.
Update2: It's triggering
JUCE Assertion failure in juce_NamedValueSet.cpp:238
Update3: I'm a damn fool! I have a namespace called Settings :p mystery solved.
-
@d-healey said in NUM_API_FUNCTION_SLOTS:
Update3: I'm a damn fool! I have a namespace called Settings :p mystery solved.
Actually I think you will find I have the "damn fool" slot covered.... :p
-
A while ago I've dug for a very long time with an export issue on one of my projects... Then I realized that the name of this project contained the word "system" in it so it was bugging the compiler... Scratched my head for almost a month