I slept on the problem and managed to find a workaround, although it's not a complete one.If I implement the delegate method -browser:numberOfRowsInColumn:, NSBrowser recognizes my object as an old-style delegate and will send all of the optional delegate methods. However, as I mentioned, this also severly limits the usability of NSBrowser because now calls to -itemAtRow:inColumn: and similar methods throw an exception that they are not supported.My solution (and by solution I mean hack) is to subclass NSBrowser and implement my own -itemAtRow:inColumn: method, like this:- (id)itemAtRow:(NSInteger)row inColumn:(NSInteger)column { NSMatrix* columnMatrix = [self matrixInColumn:column]; NSCell* cell = [columnMatrix cellAtRow:row column:0]; return cell.objectValue; }Since all of the cells in the NSMatrix are bound to the objects in the NSTreeController, the item of any given [row,column] is a well-known value. (Why NSBrowser can't do this is beyond me.)It doesn't solve the problem of -p
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: