• 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: views from nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: views from nibs


  • Subject: Re: views from nibs
  • From: James Spencer <email@hidden>
  • Date: Wed, 19 Oct 2005 19:12:14 -0500


On Oct 19, 2005, at 3:25 PM, Craig Hopson wrote:

Disclaimer: I'm new to Cocoa and clueless. I have tried the archives and samples, but cannot find anything that seems to pertain (there's that clueless-ness coming into play) to my situation...

I have a custom view 'A' which contains two other custom views. In the window, I want to be able to toggle between a single instance of 'A' and any number of 'A's stacked upon each other in a sort of list format. I would like to control both orientations via a single WindowController. How do I load from a nib - OK, I know I can use loadNibNamed and I assume that the 'Owner' is the controller. But, how do I manage each instance so that I can have connections to all of the views?

There are lots of ways but one is to subclass NSWindowController, adding outlets for your views. Read the subclass' header into IB and set the class for the File Owner to be your custom subclass. Then you can connect the views to the new outlets.


Spence

James P. Spencer
Rochester, MN

email@hidden

"Badges??  We don't need no stinkin badges!"

_______________________________________________
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: 
 >views from nibs (From: Craig Hopson <email@hidden>)

  • Prev by Date: Re: Orange County cocoa heads interest?
  • Next by Date: NSTextField taking back first responder status?
  • Previous by thread: views from nibs
  • Next by thread: NSAutoreleasePool dilemma
  • Index(es):
    • Date
    • Thread