Populate samplemaps based on folder choice(almost working)
-
bump.
Anyone?At least the simplest of question;
Why wont a viewport clear its items with:Viewport.set("items", "");
??
Thanks -
@ten7kur said in Populate samplemaps based on folder choice(almost working):
bump.
Anyone?At least the simplest of question;
Why wont a viewport clear its items with:Viewport.set("items", "");
??
ThanksI think it's a bug. i just did a simple test and you're right, it doesn't work.
-
@ten7kur possibly try to insert viewport.changed somewhere in the code to tell the component to initiate the callback and update item list. I believe I had the viewport updating not to long ago, just not in an if statement. Might not work, just trying to help
-
@d-healey Apparently, you need to have at least something as a workaround,
likeViewport.set("items", "-");
orViewport.set("items", "Select a category");
I think
.isNotEmpty()
is the cause:void ScriptingApi::Content::ScriptedViewport::setScriptObjectPropertyWithChangeMessage(const Identifier &id, var newValue, NotificationType notifyEditor /* = sendNotification */) { if (id == getIdFor(Items)) { jassert(isCorrectlyInitialised(Items)); if (newValue.toString().isNotEmpty()) { currentItems = StringArray::fromLines(newValue.toString()); } } ScriptComponent::setScriptObjectPropertyWithChangeMessage(id, newValue, notifyEditor); }
I'll try to remove it...
-
@coreyu21 said in Populate samplemaps based on folder choice(almost working):
possibly try to insert viewport.changed somewhere in the code to tell the component to initiate the callback and update item list
Tried it but no luck..
I looked in the API, found "changed()" but it seems like it exists for all components Besides the Viewport..@ustk said in Populate samplemaps based on folder choice(almost working):
I'll try to remove it...
-
It works by commenting out the
.isNotEmpty()
condition
@d-healey I'll make a pull request to your fork in a moment if you want this fix of course...
The fact is that I don't know if it can involve a wrong behavior somewhere else in Hise, so, be warned if you use it! -
@d-healey What branch should I use in your fork? The develop seems more recent than the scriptnode one...
-
@ustk yeah the develop one
-
@ustk You're a beast! for goin nitty gritty!
Wish i could be more code efficient!..not yet! -
@ten7kur It's pushed on Dave's repo, you can compile it and test ;)
https://github.com/davidhealey/HISE/tree/develop -
@ustk said in Populate samplemaps based on folder choice(almost working):
@ten7kur It's pushed on Dave's repo, you can compile it and test ;)
https://github.com/davidhealey/HISE/tree/developAwesome stuff! Just compiled and tested it!
Thanks so much for taking your time to fix this!!Hopefully now i can finish my script