Re: Toolbar Item Validation in a Panel
Re: Toolbar Item Validation in a Panel
- Subject: Re: Toolbar Item Validation in a Panel
- From: Glenn Andreas <email@hidden>
- Date: Thu, 21 Oct 2004 17:02:16 -0500
What strikes me is that you may be correct. It could be the fact
that the system is going to the item's target first and asking if
the item should be enabled. Because I don't control the target,
the target could be returning "No, it should not be enabled
(potentially because a modal dialog is up)". Because the target,
whatever that may be, is responding "no" then my code (the
delegate) never gets a chance to respond to the message.
I just had a play with my code and discovered that the standard
colour toolbar item doesn't seem to have a target, so we're probably
on the wrong track here.
Also, my validateToolbarItem: method gets called quite frequently as
the mouse moves over the toolbar, so the fact that yours doesn't get
called at all seems to imply that it's a more basic problem.
Can you put an NSLog([[[myToolbar delegate] class] description]) somewhere?
Amar
<shameless plug>
gandbug <
http://projects.gandreas.com/gandbug> will let you
introspect these thing at run time - makes it easy to see what all
the items in a toolbar are, what their targets are, etc...
You can even type in obj-c methods (or any other expressions) to be
dynamically executed and see if the target, in fact, responds with
"no".
</shameless plug>
--
Glenn Andreas email@hidden
<
http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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