Re: Creating a NSView with Interface Builder
Re: Creating a NSView with Interface Builder
- Subject: Re: Creating a NSView with Interface Builder
- From: Jaime Magiera <email@hidden>
- Date: Mon, 25 Feb 2008 21:53:01 -0500
On Feb 25, 2008, at 4:41 PM, Herr Thomas Bartelmess wrote:
Hello,
i'm currently working on a Plugin. My problem is that i have to
provide a preference View. I have to give a NSView to the programm.
Currently i wrote a NSView Subclass, but its to much work to do
every button an textfield by code. My question is, how can I design
an View in Interface Builder an give the result as an NSView to an
other object.
Hi Thomas,
Yes, this is something popular to do. Here is what I've done for
plugins...
- Create a window controller class in the plugin
- Create a IBOutlet that is connected to an NSView (in the plugin's NIB)
- During runtime, instantiate that window controller (when you
instantiate the plugin) in the main app.
- From within the main app, query the the plugin's window controller
for the IBOutlet NSView, and add it to the app's master view.
- If you are creating an app that has multiple plugins, you can simply
remove the previous subview from the master view each time a different
plugin is selected in the app.
hope that helps,
Jaime Magiera
Sensory Research
http://www.sensoryresearch.net
_______________________________________________
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