How do you change FilterView floating til 'processorId' by script?
-
Something like this
const data = myFloatingTile.get("data"); const dataAsObj = data.parseAsJSON(); Console.print(trace(dataAsObj)); data.processorId = "whateverYouWant"; myFloatingTile.set("data", trace(dataAsObj)); -
@d-healey OK we got prints, but I get this error...am I missing something?
// I moved the 'const' outside of the function....should I keep inside and make local? Console.print(trace(dataAsObj)); data.processorId = "Filter1"; FilterViewMain.set("Data", trace(dataAsObj));
Console.print(trace(dataAsObj)); data.processorId = "Filter1"; FilterViewMain.set("Data", trace(dataAsObj)); -
@Chazrox said in How do you change FilterView floating til 'processorId' by script?:
data.processorId = "Filter1";
Aha, looks like I left you a
typomystery to solve. -
@d-healey haha. I have been trying to use uppercase ProcessorId, ProcessorID, processorId.....
Those still same results..
Also, I know data is in property editor as "Data" not "data" so I already tried that too, but im getting all mixed up now. lol.
this is what prints good:
const Data = FilterViewMain.get("Data"); < ---- Prints Good Console.print(Data); -
@Chazrox said in How do you change FilterView floating til 'processorId' by script?:
I have been trying to use uppercase ProcessorId, ProcessorID, processorId.....
Won't help you here. Look at the error, it says it can't assign to this expression, that means the thing on the right of the
=can't be assigned to the thing on the left.In this case
datais just the text we got from the floating tile.What you should be assigning to (and where my typo comes in) is the object
dataAsObj -
@d-healey Can you show me please. Im confused now.

-
@Chazrox I'll let Dave of the past show you - https://forum.hise.audio/topic/7466/updating-floatingtile-content-data/2
-
@d-healey
Well thats a new one!
It works!
Thank You!
In case anyone needs this solution specifically:
const Data = FilterViewMain.get("Data"); // Declare this outside of your function // inside your function call: //THIS WORKS! local data = FilterViewMain.get("Data").parseAsJSON(); data.ProcessorId = "Filter1"; // We're changing FilterView connection dynamically FilterViewMain.set("Data", trace(data)); -
C Chazrox has marked this topic as solved
-
Bit easier than reading, adjusting and rewriting:
const var FloatingTile1 = Content.getComponent("FloatingTile1"); var data = { "Type": "FilterDisplay", "ProcessorId": "Filter1" }; // either FloatingTile1.setContentData(data); // or FloatingTile1.set("Data", JSON.stringify(data)); // both ways work but I find the first one easier to read -
@dannytaurus ahh I like this way too. I didnt know how to do that. i can actally use that method for my theme switching script I imagine!
