Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
- Subject: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?
- From: "aaron smith" <email@hidden>
- Date: Wed, 10 Dec 2008 12:50:58 -0800
Hey All, this could be a newbie question, or a somewhat mid-level
question. Basically, I don't understand how I can create "views" that
aren't associated with an NSWindow, or NSPanel.
Here's a breakdown of what I'm trying to accomplish..
-I have a MainMenu nib.
-in that it has the usual 1 window.
-On the Window, I have a NSToolbar.
-The NSToolbar has 2 buttons (view1,view2) View 1 will be the default.
Now what I want to do is show/hide view1/view2 depending on which
button you click. What I'm confused about is achieving "tab" like
behavior, without using a tab view.
How do I go about create views separately, and attaching them to the
NSWindow, based on the toolbar buttons. I'm looking for is some
direction.
Here's kind of what I was thinking..
option 1. Create multiple NSWindows or NSPanels, for view1,view2. Use
the contentView property of those windows to attach to my main window
when you've clicked a toolbar button.
option 2. Use separate nibs for the views, each nib would be an
NSPanel. Then the main bundle loads those nibs in, attaches it's
contentView to the main bundle's main view.
Is this the right direction? I'd really appreciate some feedback.
Thanks all
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden