This object was palettized and MiscKit-ized by Don Yacktman, with permission from Tim Bissell. Tim's original release notes: TreeBrowser ----------- Alpha release 3 6-mar-97 ----------- The TreeBrowser has been renamed to MiscTreeBrowser and is now part of the MiscKit; to build it, build the MiscKit, OR "make install" Palette/MiscTreeBrowser then "make" Examples/MiscTreeBrowserTest to try it out. Written for NS 3.3, doesn't use FoundationKit. The MiscTreeBrowser View consists of three classes; MiscTreeBrowser : subclass of ScrollView MiscTreeBrowserMatrix : subclass of Matrix MiscTreeBrowserCell : subclass of ActionCell A MiscTreeBrowser view displays the contents of one or more 'trees' of objects. These objects must conform to the MiscTreeBrowserNodes protocol (MiscTreeBrowserProtocols.h) which contains methods to add and remove child nodes etc. A basic object conforming to this protocol is provided in the test code, in MiscTreeBrowserObject.h. It is envisaged that users of the view will add a category to the object class(es) they wish to display, and which conforms to the protocol to enable the view to display and manipulate their object trees. Example methods can be copied from _MiscTreeBrowserObject.[hm] The user can edit the displayed text of any node (setStringValue:) by double-clicking on the cell text and retyping it. Selected cells (and nodes) can be deleted (if the parent node returns YES to -canRemoveChild:) by hitting the delete key. Sibling nodes can be added by selecting a cell and hitting return. The user can move through the tree hierarchy using the cursor keys; try the left and right arrow keys to open and close nodes -- do you find this useful and intuitive? Nodes can now be dragged around in the hierarchy. The code has not been tested outside the framework of the project, so bug reports will be most welcome. In addition, please pound me with specific questions about how to use it, and how it works -- I plan to document the classes and protocols in Autodoc format, and this is the easiest way (for me) to find out which areas need to be clarified. In addition, some file and method names may change, but only to make things more consistent, not less! If anyone has any suggestions on how to improve the code, nomenclature and interface, and especially tips on make it fit better into the framework of the MiscKit I'd like to hear them. A particular area of concern is the API, especially the method names in MiscTreeBrowserNodes protocol; are they too general, and likely to have type clashes with methods already implemented? KNOWN BUGS: Escape does not quit and restore old text when editing a node title. Node dragging image is clipped at the bottom of the matrix. FUTURE ENHANCEMENTS: Persistent open/closed state for nodes (not just those visible in cells) Allow a node to determine what happens if a user hits "Return" on it; e.g create new node; add as child or as sibling. Support for alternative node icons supplied by nodes. Support for dimming/disabling nodes outside of a node tree (like the class browser in InterfaceBuilder). --------------------- IMPORTANT -------------------------- This code is copyright by Tim Bissell, but you do what you want with it, within the terms of the MiscKit license. Please give it to others who ask for it, but don't delete this message, so people know who to come back to with questions. --- Tim Bissell tim@ursidae.demon.co.uk DoD # 174 tjb@cmg.fcnbd.com +44 1480 451022 NeXT Developer Ducati 900SS <a href="http://www.ursidae.demon.co.uk/"> Tim's home page </a>
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.