• 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: TextEdit sample app question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit sample app question


  • Subject: Re: TextEdit sample app question
  • From: Brian Webster <email@hidden>
  • Date: Mon, 29 Oct 2001 12:53:27 -0600

The call that loads the nib file from loadUI looks like this:

[NSBundle loadNibNamed:@"FindPanel" owner:self];

The key is the second argument, which specifies which object will be the owner of the nib. In this case, it is "self", which refers to the TextFinder object. When the nib loads up, all the connections are made from this object to the various widgets (findTextField, replaceTextField, etc.).

On Monday, October 29, 2001, at 12:41 PM, Ratheesh Ramachandran wrote:

But, how do you make the connections b/w the text fields on the Find panel to the TextFinder object ? Rather, how do you make TextFinder the owner of the FindPanel.nib ?

thanks
Ratheesh

On Monday, October 29, 2001, at 10:09 AM, Brian Webster wrote:

On Monday, October 29, 2001, at 05:23 AM, cocoa-dev-
email@hidden wrote:

Can somebody explain how has the FindPanel.nib been associated with
the TextFinder instance in the Edit.nib?

All of the Find menu items' actions are connected to the TextFinder object in the Edit.nib file. When command-F is first selected, orderFrontFindPanel: is sent to the TextFinder. This in turn calls -findPanel to get the NSPanel to bring to the front. If the panel has not yet been loaded, -findPanel will call -loadUI, which loads the nib file with the TextFinder as the nib's owner.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: TextEdit sample app question (From: Ratheesh Ramachandran <email@hidden>)

  • Prev by Date: Re: TextEdit sample app question
  • Next by Date: Re: Right way to get system preference values
  • Previous by thread: Re: TextEdit sample app question
  • Next by thread: Re: Cocoa Addition (3D Engine)
  • Index(es):
    • Date
    • Thread