• 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: menuItem connection to other nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menuItem connection to other nib


  • Subject: Re: menuItem connection to other nib
  • From: daniel <email@hidden>
  • Date: Sat, 15 Jan 2005 00:26:41 -0800

Or, I should say, in the responder chain... which is a bit more complicated than just being the first responder. Still, you can't hook up to an arbitrary object in another nib, as far as I know.

On Jan 15, 2005, at 12:10 AM, daniel wrote:

This is also assuming that your other nib will actually *be* the first responder when the menu item is selected.

If not, then I think you have to make sure that something that is first responder forwards the message along to the object you're interested in targeting.

Daniel

On Jan 14, 2005, at 2:20 PM, Kaelin Colclasure wrote:

On Jan 14, 2005, at 10:34 AM, email@hidden wrote:


How would i go about doing this?



In your MainMenu.nib, add an action to the FirstResponder psuedo-class with the selector you want called on the File's Owner of your "other" .nib file. Then, simply wire the action of your menu item to First Responder. Cocoa will take care of the rest. :-)


[Again, this is all assuming that your File's Owner is something "normal" like an NSWindowController or some other NSResponder subclass.]

-- Kaelin



AC

On 14-Jan-05, at 1:26 PM, Kaelin Colclasure wrote:



On Jan 14, 2005, at 8:22 AM, email@hidden wrote:




How can i connect a menuItem that i have in my mainMenu nib files to my File's owner in another nib file? Im sure this is really simple, i just cant find anything on the subject.





Before you do this, are you sure you can't accomplish what you want using the responder chain? In general, if Files Owner in the "target" nib is an NSResponder subclass, the responder chain is the "right" way to get where you're trying to go.


-- Kaelin





thanks Alex

_______________________________________________
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

















_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ 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: 
 >menuItem connection to other nib (From: email@hidden)
 >Re: menuItem connection to other nib (From: Kaelin Colclasure <email@hidden>)
 >Re: menuItem connection to other nib (From: daniel <email@hidden>)

  • Prev by Date: Re: menuItem connection to other nib
  • Next by Date: Re: Bur Reporter question
  • Previous by thread: Re: menuItem connection to other nib
  • Next by thread: Multiple section binding in tables
  • Index(es):
    • Date
    • Thread