• 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: "R. Scott Thompson" <email@hidden>
  • Date: Fri, 22 Oct 2004 11:34:12 -0500


On Oct 22, 2004, at 11:01 AM, R. Scott Thompson wrote:

But as I've said, this routine is never called :-(

Now that I think about it, I wonder if the routine is not called because nobody in the first responder chain responds to the actions that the toolbar item sends... Hmmmmm....


Responding to my own post.... this is exactly what was happening.

To create my modal dialog I use an NSWindowController (not because I strictly need one, but more because it is convenient). When I do that, however, I never add the window controller to any document (because it's not a document window... it's a modal dialog). Unfortunately I didn't give that NSWindowController a next responder. What appears to be happening is that when the toolbar item is looking for someone to handle the "orderFrontColorPanel:" action and couldn't find one because the responder chain didn't actually contain that method.

What I did was set the next responder of my NSWindowController to NSApp and that took care of the enabling problem.

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

Scott

_______________________________________________
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: j o a r <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>)

  • Prev by Date: Re: Tall NSTableView Column Headers
  • Next by Date: Re: using printf to print objects
  • Previous by thread: Re: Toolbar Item Validation in a Panel
  • Next by thread: Re: Toolbar Item Validation in a Panel
  • Index(es):
    • Date
    • Thread