[Pyobjc-dev] (Class)Browser demo
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-06-08 13:37:12
|
I've attached a ClassBrowser demo program I just wrote. It's very simple, contains an NSBrowser and an NSTableView inside an NSSplitView. In the browser you can browse the class hierarchy, beginning with NSObject. In the table view you see a list of methods defined in the selected class (and only those defined there, it doesn't list inherited methods). Build the app like so: $ python buildapp.py --link build (--link is useful if you want to play with the source, with --link, you don't have to rebuild the app after you modify the source or the nib.) I found NSBrowser fairly simple to work with, but there's one gotcha: the NSBrowserDelegate informal protocol is not yet defined in AppKit.__init__. I've included one in the program itself (actually, it takes up about half of the lines in the program...). (Note that I'm working on a script that generates definitions for all protocols from header files; I think this might hit CVS fairly soon.) Just |