Re: Toolbar Item Validation in a Panel
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