Re: Using NSWindow without NIB (XIB) file ?
Re: Using NSWindow without NIB (XIB) file ?
- Subject: Re: Using NSWindow without NIB (XIB) file ?
- From: Uli Kusterer <email@hidden>
- Date: Wed, 26 Jan 2011 10:50:27 +0100
On 26.01.2011, at 07:10, Lou Zell wrote:
> NSView *localView = [[NSView alloc] init];
> [window setContentView:localView];
> [localView release];
While this is perfectly valid code, usually you want to leave the content view alone (NSWindow already creates one for you). A better example would probably be:
NSButton* localView = [[NSButton alloc] initWithFrame: NSMakeRect(10,10,100,20)];
[[window contentView] addSubview: localView];
[localView release];
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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