UIViewSwitchContainer

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Arne Scheffler
Posts: 354
Joined: Mon Jun 20, 2016 7:53 am

Re: UIViewSwitchContainer

Post by Arne Scheffler »

OK, can you describe a bit more in detail what you want to achieve and what exactly is failing ?
I use it all the time without issue.

Cheers
Arne

chroma
Posts: 9
Joined: Mon Oct 30, 2017 4:47 pm

Re: UIViewSwitchContainer

Post by chroma »

Thanks for your help, Arne.

I have two templates that I want to show in succession, one after the other.

My understanding is a switch view would allow me to switch between the templates with a control? Individually, my two templates work correctly with their own sub-controllers, no issues there.

I've had absolutely no luck in getting either template to show in the template containing a SwitchContainer.

If I add the templates to the SwitchContainer they don't persist (as mentioned before, I have added them to the XML as well, but didn't work for me either).

I have attached a screenshot of my UIViewSwitchContainer settings in the editor.



I have worked on many VST2.4/3 projects before but never with the new VSTGUI. Not sure where I'm going wrong.

Thanks again
Oli
Last edited by chroma on Tue Nov 14, 2017 5:27 pm, edited 1 time in total.

Arne Scheffler
Posts: 354
Joined: Mon Jun 20, 2016 7:53 am

Re: UIViewSwitchContainer

Post by Arne Scheffler »

chroma wrote: My understanding is a switch view would allow me to switch between the templates with a control?
That is right, what I'm missing in your XML and the screenshot is the control that should switch between the templates.
Without it, it does not work.

chroma
Posts: 9
Joined: Mon Oct 30, 2017 4:47 pm

Re: UIViewSwitchContainer

Post by chroma »

I really hate to drag this out but I have tried everything I can think of, including adding a control for switching.

Regardless of what I try, I end up with a blank editor view with a black background.

Here is my XML file again, with the control switch. I've disabled all the sub-controllers for simplicity, it doesn't work with those enabled anyway.



And the result:


This was supposed to be a 5-minute project but this little hiccup has stretched it out for weeks.

Thank you for your patience.

Oli
Last edited by chroma on Tue Nov 14, 2017 5:27 pm, edited 1 time in total.

Arne Scheffler
Posts: 354
Joined: Mon Jun 20, 2016 7:53 am

Re: UIViewSwitchContainer

Post by Arne Scheffler »

The problem is, that the switch control is a sub view of the switch container. That cannot work as the switch container will always replace its children with the contents of the templates.

chroma
Posts: 9
Joined: Mon Oct 30, 2017 4:47 pm

Re: UIViewSwitchContainer

Post by chroma »

Oh good god, it works!!!

Thank you so much, Arne.

Post Reply