Re: Focus ring changed
Re: Focus ring changed
- Subject: Re: Focus ring changed
- From: Ricky Sharp <email@hidden>
- Date: Mon, 15 Nov 2004 15:32:29 -0600
On Nov 15, 2004, at 2:29 PM, Eric Long wrote:
I expected to find some kind of delegate method like
"firstResponderChanged"
so I could know when a user changes the focus in my window from one
table to
another, but I don't see a callback anywhere for this.
I don't know of any notification mechanism, but that doesn't mean there
isn't one.
When one particular table is the focus, I want to disable a button,
and when
the other table has the focus I want to disable it. The Cocoa
mechanisms
underneath know when the focus changes and place the focus ring around
the
tables appropriately, but I want to be called when the ring moves.
What is the proper Cocoa way to be notified when the focus changes?
Don't know the "proper" way, but you could subclass your table and
provide an implementation for becomeFirstResponder. In that method,
you could perform your own type of "notification mechanism" to
effectively tell your button what state to go in.
It would be cool if there exists a way to do this with bindings. For
example, I know you can bind the enabled state of a button to certain
things. Perhaps there's a way to bind the enabled state to some
"property" of your table such that one table effectively returns YES
and the other NO?
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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