Using Custom Views With AppleScript

hey masters and beginners,

i am now trying to use a custom view with my applescript project. i have searched google for ages on how to actually use custom views - but other than an apple document that told me nothing - i did not really find anything that was worth the while to study.

to make it short. it ain’t working :smiley:

i could use the tab view of IB 3 - but i feel that a custom view will make life easier.

so my question:

is there some easy way to simply set the custom view to the contents of another window?
i wanted to simply have the main window called “main.” then i have the custom view in there. when a person hits button X, then the content of the custom view changes to what another window “X” has on it. Same would go on for other buttons.

so in some kind of inventive applescript language:

set viewOne to contents of window "windowOne"
set contents of view "mainView" to viewOne

anything like that possible?
or just in general, how do i use these custom views. im lost :frowning:

again, THANKS :smiley: