Re: NSBrowser's selectRow: inColumn: delegate
Re: NSBrowser's selectRow: inColumn: delegate
- Subject: Re: NSBrowser's selectRow: inColumn: delegate
- From: Andrew Cooper <email@hidden>
- Date: Wed, 31 May 2006 01:50:23 -0500
So it seems that the delegate method is only called when the
selectRow: inColumn message is sent to the browser in code. While I
had seen this in the documentation for the delegate method, I did not
realize that this only happens when the selection changes
programatically; i.e. it does not seem to happen during a mouse click
on the browser's view.
If this is indeed the case, how can I find out when these selection
clicks occur and add my own processing? I need to know when these
selection changes happen so that I can update the controller's data
to give to the browser in the other delegate methods. I tried using
the browser's action, but that fires after the browser requests the
new row count and column title. I was hoping to use the browser:
selectRow: inColumn: method because it seems like that would come
before any new data request methods (there is no reason to request
new data if the new selection isn't approved).
I have contemplated using bindings for this, but either my CoreData
backend model doesn't seem conducive to bindings or I have a large
lack of understanding in how to connect a browser with my data
backend. Quite probably, it is both.
Any advice on the topic is, as always, greatly appreciated.
- Andrew Cooper -
On May 30, 2006, at 10:34 PM, Andrew Cooper wrote:
i've seen brief mention of this in places, but are there known
issues with the
- (BOOL) browser:(NSBrowser *)sender selectRow:(int)row inColumn:
(int)column
delegate method for NSBrowser?
I currently have this implementation in my delegate class (content
edited for length):
- (BOOL)browser:(NSBrowser *)sender selectRow:(int)row inColumn:
(int)column
{
NSLog(@"Selecting row %d and col %d",row,column);
return YES;
}
This method never prints anything and none of the other logic in the
real implementation ever happens, so it doesn't seem like the method
is being called as it should.
I also have the following delegate methods implemented, all of
which do work:
- (void)browser:(NSBrowser *)browser willDisplayCell:(id)cell
atRow:(int)row column:(int)col
- (int)browser:(NSBrowser *)browser numberOfRowsInColumn:(int)col
- (NSString *)browser:(NSBrowser *)sender titleOfColumn:(int)col
Hopefully there's nothing obvious in this that i'm missing, as I've
been beating my head over this all day.
- Andrew Cooper -
_______________________________________________
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