Re: Two table views - which has "focus"?
Re: Two table views - which has "focus"?
- Subject: Re: Two table views - which has "focus"?
- From: Steve Woodward <email@hidden>
- Date: Tue, 27 Dec 2005 19:10:13 -0500
Thanks for the reply. I am probably going to go with your first
suggestion.
I would imagine that there are cases where you would want to know
when a control became focused on, tables or otherwise. In this
particular case two tables share the same set of detail fields. I
need to load data in the fields whenever a row is selected, and in
the case of a table that already has a "pre-selected" (greyed) row I
need to reload that data without the table having to be clicked
twice. I know it's not the most common behavior, nor recommended, but
I'm porting a windows app and the client wants the same GUI behavior.
Small price to pay for getting someone to switch I figure!
Thanks again, I appreciate it.
Steve Woodward
On Dec 26, 2005, at 7:55 PM, Daniel Jalkut wrote:
Hi Steve - I think you'll need to subclass NSTableView and send
notifications (or make a delegate call) yourself when the view gets
focused (becomeFirstResponder).
Another choice (if you want to generalize to the whole window)
would be to sublass NSWindow and implement your own version of
"makeFirstResponder:" that shouted about the changes being made.
It's hard to think of circumstances where this would be a good
idea. What springs to mind is perhaps software for children, or
something, where the expected UI behavior is (I guess) not
desired. I don't think most people associate changing focus with
causing side-effects in the state of the application or window as a
whole.
Daniel
On Dec 24, 2005, at 2:12 PM, Steve Woodward wrote:
I've searched the archives, found some similar threads but nothing
that has helped me much...
I have a window with two table views. I need to respond to the
user clicking on either table view, whether they are changing the
selected row or not. Currently I am responding to - (void)
tableViewSelectionDidChange:(NSNotification *)aNotification, but
that only works when the user selects a new row. In other words,
if they click on table1 and then table2, a row is left "selected"
in grey in table1. When they click back on table1 on that greyed
row there is no selection change, so I can't respond to it. But I
need to do something at that time anyway. I've been reading up on
first responder and the responder chain but so far haven't been
able to figure this problem out.
Thanks in advance for any tips!
Steve Woodward
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
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