@d-healey Hi David, I had to rebuild my plugin and now am having issues with this again. Could you take a look at this?
I have this in my onInit:
const var Sampler1 = Synth.getSampler("Sampler1");
const var list = Sampler.getSampleMapList();
const var SampleViewer1 = Content.getComponent("SampleViewer1");//viewport
const var SampleName1 = Content.getComponent("SampleName1");//label
SampleViewer1.set("useList", true);
SampleViewer1.set("items", list.join("\n"));
inline function onSampleViewer1Control(component, value)
{
Sampler1.loadSampleMap(list[value]);
SampleName1.setValue(list[value]);
};
Content.getComponent("SampleViewer1").setControlCallback(onSampleViewer1Control);
This is loading Samplemaps via the Viewport. It is supposed to update the label with the name of the Samplemap as well but fails to do so upon clicking the Samplemap in the Viewport.
I have this in the SampleLoadSave.js:
const var samplepanel = Content.addPanel("SamplePanel", 0, 0);
samplepanel.setLoadingCallback(function(isPreloading)
{
if (!isPreloading && isCustomMap)
{
var s = Sampler1.createSelection(".*")[0];
SampleName1.set("text", s.get(Sampler1.FileName));
}
});
This is the code you kindly provided me above. It sets the name of the label to the Custom Sample Filename/Path.
Everything works as it should except the Label not updating upon clicking the Samplemap in the Viewport.
Can you spot an issue?
All the best!