Re: creating a nsview without IB
Re: creating a nsview without IB
- Subject: Re: creating a nsview without IB
- From: Uli Kusterer <email@hidden>
- Date: Mon, 19 Dec 2005 21:07:34 +0100
Am 19.12.2005 um 19:14 schrieb Andrea Salomoni:
// setting up interface
theChatView = [[privateChat alloc]init];
[[theChatView mainView] setFrame:[placeholder bounds]];
[[theChatView mainView] setFrameOrigin:NSZeroPoint];
[placeholder addSubview:[theChatView mainView]];
[_allMyViews addObject:theChatView];
[privateChat release];
The problem is placeholder outlet that I cannot use, because the
NSView (placeholder) must be created without IB!
I'm not sure what you're trying to do that doesn't work. Just as you
can create an object of any other class, you can also create an
NSView using alloc/init (or rather, -initWithFrame:). Outlets are
only needed for IB, otherwise just use a regular instance variable in
your class.
To add a view to a tab view item, you have to create the
NSTabViewItem and add it to your NSTabView and then set its view to
your NSView using its setView: method. There's really not much to it.
Does that address your problem?
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden