Re: item based NSBrowser


Bill Cheeseman
 

Back when I was first starting to develop my UI Browser product, https://pfiddlesoft.com/uibrowser, there were three helpful Objective-C Cocoa code examples for NSBrowser from Apple: SimpleCocoaBrowser, ComplexBrowser, and AnimatedTableView. I haven't looked at them in a long time, but I'm sure you can find them somewhere.

UI Browser implements six NSBrowserDelegate methods that I describe in my source code comments as "required NSBrowser item-based delegate methods." They are: -rootItemForBrowser:, -browser:numberOfChildrenOfItem:, -browser:child:ofItem:, -browser:isLeafItem:, -browser:willDisplayCell:atRow:column:, and -browser:objectValueForItem:. You left two of them out of your list of "required" item-based methods.

UI Browser also implements a number of optional NSBrowserDelegate methods, including: -browser:numberOfRowsInColumn:, -browser:shouldShowCellExpansionForRow:column:, and -browserDidScroll:.

Bill Cheeseman

On Jan 3, 2021, at 1:31 AM, Gerriet M. Denkmann <gerriet@...> wrote:

So: how do I create an "item based NSBrowser" with a delegate using "item data source methods” ?


On Jan 3, 2021, at 1:31 AM, Gerriet M. Denkmann <gerriet@...> wrote:

So: how do I create an "item based NSBrowser" with a delegate using "item data source methods” ?

Join cocoa@apple-dev.groups.io to automatically receive all group messages.