Re: Interface builder, .nibs, etc ...
Re: Interface builder, .nibs, etc ...
- Subject: Re: Interface builder, .nibs, etc ...
- From: Chuck Soper <email@hidden>
- Date: Wed, 17 Dec 2003 15:31:39 -0800
It seems preferable to me to put the contents of the custom view in
the main content area of a window in a separate nib. The nib's owner
would be a subclass of NSWindowController. To get the view without
its window, I do this:
windowController = [[MyController alloc] initWithWindowNibName: @"FileName"];
NSView * theView = [[[windowController window] contentView] retain];
[windowController setWindow: nil];
I haven't been able to confirm through the documentation that it's
okay to set an NSWindowController's window to nil. Is it recommended
or okay?
Having the view in a window allows me to test the interface in IB to
make sure auto-sizing is correct for all of the controls. I also like
the ability to display the view in its own window.
Chuck
At 1:11 PM -0800 12/17/03, Amul Goswamy wrote:
The MultipleNibTabView project contains two custom views, each in a
separate nib. The views are loaded into the application and are
used as the view for each tab in an NSTabView.
-Amul
On Dec 17, 2003, at 1:03 PM, Chuck Soper wrote:
Thanks for mentioning these code examples. I'm quite familiar with
the SimpleMultiWindow example and have referred to it often. In
fact, I think that it should be mentioned at the end of the
Currency Converter example (I've already given that feedback to the
Tech Writers).
I've never seen MultipleNibTabView, but I assume it must be on
Panther. I'm currently using Jaguar and I'm planning to install
Panther in the next couple of days. I'll be sure to check it out.
Chuck
At 9:49 AM -0800 12/17/03, Amul Goswamy wrote:
Some related code examples are at:
/Developer/Examples/InterfaceBuilder/MultipleNibTabView/
and
/Developer/Examples/InterfaceBuilder/SimpleMultiWindow/
-Amul Goswamy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.