Re: TextEdit sample app question
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