• 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: Toolbar Item Validation in a Panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbar Item Validation in a Panel


  • Subject: Re: Toolbar Item Validation in a Panel
  • From: j o a r <email@hidden>
  • Date: Fri, 22 Oct 2004 19:29:41 +0200


On 2004-10-22, at 18.34, R. Scott Thompson wrote:

I haven't worked extensively with managing the responder chain does my solution seem reasonable?

No, the shared NSApplication instance (and it's delegate) is always a part of the first responder chain - regardless of what you do.

The rules for automatic validation, be it for menu or toolbar items, is really simple. If the item has a target and if the target implements the validation method, ask the target, if not, search the first responder chain for an object implementing the validation method.
This also means that if an item does not have one of your objects for a target, your validation methods will never be called for that item - unless one of your objects happens to be part of the first responder chain.

I found this thread very confusing, so I made a little sample app (<http://www.joar.com/TbTest.zip>). It has only one window, and that window is made modal in "applicationDidFinishLaunching:". The color toolbar item are enabled just fine. Could it be that you have something else that's wrong with your app?

j o a r

_______________________________________________
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
  • Follow-Ups:
    • Re: Toolbar Item Validation in a Panel
      • From: "R. Scott Thompson" <email@hidden>
References: 
 >Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: Amar Sagoo <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)
 >Re: Toolbar Item Validation in a Panel (From: "R. Scott Thompson" <email@hidden>)

  • Prev by Date: Re: Comment field in file info.
  • Next by Date: Re: Toolbar Item Validation in a Panel
  • Previous by thread: Re: Toolbar Item Validation in a Panel
  • Next by thread: Re: Toolbar Item Validation in a Panel
  • Index(es):
    • Date
    • Thread