Page 2 of 2

Re: UIViewSwitchContainer

Posted: Sat Nov 11, 2017 4:13 pm
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

Re: UIViewSwitchContainer

Posted: Sun Nov 12, 2017 11:17 pm
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

Re: UIViewSwitchContainer

Posted: Tue Nov 14, 2017 8:41 am
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.

Re: UIViewSwitchContainer

Posted: Tue Nov 14, 2017 1:25 pm
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

Re: UIViewSwitchContainer

Posted: Tue Nov 14, 2017 3:42 pm
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.

Re: UIViewSwitchContainer

Posted: Tue Nov 14, 2017 4:45 pm
by chroma
Oh good god, it works!!!

Thank you so much, Arne.