NSBrowser woes
NSBrowser woes
- Subject: NSBrowser woes
- From: Tom Waters <email@hidden>
- Date: Mon, 28 May 2001 18:35:56 -0700
Shouldn't NSBrowser have a similar api to NSTableView?
The last column is essentially a single column table, no?
There seems to be no support for managing selections, editing and/or
drag and drop.
I was expecting to find a notification like:
- (void)browserSelectionDidChange:(NSNotification *)aNotification;
and delegate methods like:
- (BOOL)browser:(NSBrowser *)aBrowser shouldSelectColumn:(int)col
atRow:(int)row;
- (BOOL)browser:(NSBrowser *)aBrowser shouldEditColumn:(int)col
row:(int)row;
- (NSImage*)dragImageForRows:(NSArray*)dragRows
event:(NSEvent*)dragEvent
dragImageOffset:(NSPointPointer)dragImageOffset;
instead, all it seems to have is:
- (BOOL)browser:(NSBrowser *)sender selectRow:(int)row
inColumn:(int)column;
that, besides being worded completely differently than the conventions
in the rest of cocoa, seems to NEVER be called.
I have this in my delegate, right after the two other browser delegate
methods which get called just fine.
- (BOOL)browser:(NSBrowser *)sender
selectRow:(int)row
inColumn:(int)column
{
NSLog(@"row %d col %d", row, column);
return YES;
}
but it nothing ever gets logged.
Has anyone done anything real with NSBrowser other than the simple
examples I've seen posted here?
ps. shouldn't it be called NSBrowserView? I get the feeling that this
class hasn't gotten that much attention in the cocoa group.