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