• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: creating a nsview without IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >creating a nsview without IB (From: Andrea Salomoni <email@hidden>)

  • Prev by Date: Re: [CORE DATA] BackgroundFetching app explanation, and more...
  • Next by Date: Re: drawing rects at runtime
  • Previous by thread: creating a nsview without IB
  • Next by thread: Re: creating a nsview without IB
  • Index(es):
    • Date
    • Thread