• 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: How to get references to objects created from nib files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get references to objects created from nib files?


  • Subject: Re: How to get references to objects created from nib files?
  • From: Brent Gulanowski <email@hidden>
  • Date: Tue, 25 Jun 2002 09:33:58 -0400

On Monday, June 24, 2002, at 10:12 PM, Ken Tozier wrote:

I'm finishing up an outline data source and need to find a way to store a reference of the NSOutlineView that is created from the nib file.

Some of the data in the outline is updated dynamically without input from the user and I need this reference in order to send it a refreshItem message.

The simplest approach that I can think of: Add an outlet to the file's owner for the NSOutlineView instance which resides in the nib, and make an accessor method which can be called in the dataSource's -init method. If the file's owner is not your class (if it's the NSApp), you could add an application delegate object to the Nib and give it the instance variable, and call [[[NSApp sharedApplication] delegate] myOutlineView] when the data source is initialized. If the data source is *in* the Nib, you'd just add an outlet to that. Likewise for the outline view's delegate, if you're using it.

Brent


There are two kinds of people in the world, those who divide the kinds of people in the world into two kinds, and those who don't.
_______________________________________________
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.
References: 
 >How to get references to objects created from nib files? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Shadows
  • Next by Date: Re: Mutable class problems
  • Previous by thread: How to get references to objects created from nib files?
  • Next by thread: large numerical arrays
  • Index(es):
    • Date
    • Thread