My project consists of 3 basic custom views, lets call them custom view “A”, “B”, and “C”.
These views can appear to the user in a wide variety of 1 and 2 view situations, all in the same window. Some possible configurations of the window “main” would include:
- Only view “B”
- Only view “A”
- view “A” and view “B” in a split view
- view “B” and view “C” in a split view
As you can see, life would be much simpler if i could just create template windows with the “A”, “B”, and “C” views, and swap them in and out of my “main” window programmatically.
And actually, when I’m trying to display just one view at a time in my “main” window, things are quite successful. I use code like:
set content view of window “main” to content view of window “template A”
and things work perfectly.
The problem comes when I want to put two views into a split view. I’ve tried setting up a split view on my “main” window, and using code like this:
set first view of split view “MySplit” of window “main” to content view of window “template A”
but that kind of code doesn’t work.
And suggestions on how to fill a split view with already created views?
Or any other way to solve my issue, other than creating 12 individual views by hand? (I’d like to avoid this particular option, because if I end up tweaking the view’s template down the road, it’ll mean endless corrections by hand of all the views that template appears in.)