Expansions / Windows
-
I've just gone to test my expansion system on Windows and..... there's an issue.
I use a combobox to switch between Expansions, rather than the Preset Browser. On my Mac, when I select an Expansion from the combobox, the Preset Browser updates itself and displays the folders and presets from the Expansion. When I select the 'Factory' presets (i.e I de-select any expansion in the combobox) the Preset Browser again updates itself and displays the 'Factory' folders and presets. Great :)
In Windows, however, when I select the 'Factory' presets the Preset Browser remains on whichever Expansion I had selected previously, and I have no (good) way of getting it to display the 'Factory' presets etc. Not great :(
I can't see anything particularly janky with my code so I'm asking if this is expected behaviour on Windows. Does anyone know?
I'm trying to make a small example project but it's crashing...
-
Are you definitely using the same version of HISE on both OS? What method are you using to deselect the expansion?
-
@d-healey Exactly the same yes. Here's a cut down version of the code (thanks for looking :) ) :
- it's pretty much taken from the docs and example projects Christoph provided
/// combo box for my sample maps const var SAMPLEBOX = Content.getComponent("SAMPLEBOX"); const var mySampleMapNames = ["SOME NAMES"]; const var expHandler = Engine.createExpansionHandler(); const var expansions = expHandler.getExpansionList(); expHandler.setAllowedExpansionTypes([expHandler.FileBased, expHandler.Intermediate, expHandler.Encrypted]); const var expansionNames = []; expansionNames.push("FACTORY"); for(e in expHandler.getExpansionList()) expansionNames.push(e.getProperties().Name); const var ExpansionSelector = Content.getComponent("ExpansionSelector"); ExpansionSelector.set("items", expansionNames.join("\n")); inline function onExpansionSelectorControl(component, value) { expHandler.setCurrentExpansion(component.getItemText()); }; Content.getComponent("ExpansionSelector").setControlCallback(onExpansionSelectorControl); // Implement the expansion switch inline function onExpansionSelectorControl(component, value) { local expansionToLoad = component.getItemText(); // We want the first item to reset the current expansion // so we need to change it to an empty string if(expansionToLoad == expansionNames[0]) expansionToLoad = ""; expHandler.setCurrentExpansion(expansionToLoad); }; Content.getComponent("ExpansionSelector").setControlCallback(onExpansionSelectorControl); var sampleMapsed = Sampler.getSampleMapList(); var backgroundImage = ""; var backgroundImage2 = ""; inline function newcombobox(newExpansion) { if(isDefined(newExpansion)) { local cx = expHandler.getCurrentExpansion(); sampleMapsed = cx.getSampleMapList(); local expansionProps = cx.getProperties(); local expName = expansionProps.Name; for (i = 0; i < sampleMapsed.length; i++) { sampleMapsed[i] = sampleMapsed[i].replace("{EXP::"); sampleMapsed[i] = sampleMapsed[i].replace("}"); sampleMapsed[i] = sampleMapsed[i].replace(expName); } SAMPLEBOX.set("items", ""); SAMPLEBOX.set("items", sampleMapsed.join("\n")); backgroundImage = newExpansion.getWildcardReference("logo.png"); backgroundImage2 = newExpansion.getWildcardReference("stars.png"); } else { SAMPLEBOX.set("items", ""); SAMPLEBOX.set("items", mySampleMapNames.join("\n")); backgroundImage = "{PROJECT_FOLDER}logo.png"; backgroundImage2 = "{PROJECT_FOLDER}stars.png"; } Image1.set("fileName", backgroundImage); Image4.set("fileName", backgroundImage2); } expHandler.setExpansionCallback(newcombobox); newcombobox(undefined);
-
You have two
onExpansionSelectorControl
functions -
@d-healey good spot!
-
@d-healey got rid of the first function and behaviour is the same i.e osx great, windows not... :/
Do you know if it's meant to work as I want it?
-
@DanH Yes it should work
-
@d-healey ok that's good to know, thanks. Everything in the newcombobox function is working fine (there's a bunch of stuff I took out too).
If I use the Preset Browser to navigate the expansions and back to factory again it displays the right presets etc.
If you have an idea of where I can start figuring out where the problem is please let me know :)
-
@DanH said in Expansions / Windows:
where I can start figuring out where the problem
Make a mini project and post it here
-
@d-healey here ya go:
https://www.dropbox.com/s/rulz3jbqw5fl5x7/EXP TEST.zip?dl=1
Cheers for having a look :)
-
@DanH said in Expansions / Windows:
Cheers for having a look
It works fine on GNU/Linux. I'll fire up the Windows machine later on and take a look there.
-
@d-healey :folded_hands_light_skin_tone:
-
Works on my Windows machine using new_layout branch.
-
@d-healey really? That's weird.... Thanks so much for checking though. So the presets change when expansions and factory are selected?
-
@DanH said in Expansions / Windows:
So the presets change when expansions and factory are selected
Yep. Make a video of what you see so I can compare.
-
@d-healey is there an inbuilt windows screenrecorder? otherwise will grab obs
-
is there an inbuilt windows screenrecorder?
https://www.howtogeek.com/706124/how-to-use-windows-10s-built-in-screen-capture-tool/
-
@d-healey Thanks, I did it on my phone in the meantime!
-
@DanH Which branch are you using?
-
@d-healey master. I can't go any further with this project at the moment