Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBrowser woes



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.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.