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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to