Mark, et al, In the language of Cocoa, a drawer is an instance of NSDrawer, a subclass of NSResponder and a sibling to NSWindow. So windows and drawers share many common characteristics.
Without getting into the details of these classes, windows, sheets, panels and drawers are all window like thingies that frame some content for display. Many things can be displayed equally as well in any one of them, (e.g. buttons, pop-up menus, check boxes, text boxes, etc.) Among the things that can be displayed in any of them are NSTableView and NSOutlineView. NSOutlineView, in particular, provides rows of items that can be expanded to display hierarchically subordinate data. An NSOutlineView is a subclass of NSTableView and has a class heritage as follows in Cocoa: NSOutlineView : NSTableView : NSControl : NSView : NSResponder : NSObject Using OmniWeb as an example under its default preferences, if you select Tools->Show Global History from the menu bar, what you see are instances of the classes NSOutlineView (to allow expansion of domains to the pages browsed within each domain) embedded in an NSScrollView (in case your bookmarks won't all fit within the displayed area of the drawer) within an NSTabView (to allow selection among "Global History" and "Browser History"), inside an NSDrawer (which slides out from the browser window.) Drawers, rather than windows, are typically used to display content that is auxiliary to, but associated with, the content of the window to which it attaches. Drawers are also used where there is no need to stop the application until the user responds to the drawer (as would be the case, for instance for a Save dialog box.) If you question whether bookmarks and a history list is an appropriate usage of drawers in the case of OmniWeb, you can always change the Bookmark preferences to show bookmarks and the history list in a separate window rather than a drawer. If the content should be application modal (i.e. should stop the application till the user responds) and is associated with a specific window, then an instance of NSSheet should be used rather than NSDrawer, as it is in Cocoa for the Save dialog box. The mechanisms to display the content are relatively independent of which of drawer, window, sheet or panel is chosen. To everyone on this list interested in the development of Nisus under MacOS X, I would recommend the excellent book, Building Cocoa Applications: A Step-by-Step Guide by Michael Mahoney and Simson Garfinkel, for an excellent description of what these components are and how they are used. One of the very nice features of this book, is that the first few chapters give an excellent overview of these Cocoa components with examples and recommendations for use before ever immersing the reader in actual Cocoa development under Objective C. It can make you a Cocoa super user before scaling the steep Cocoa learning curve. I would also, by the way, recommend this book to the Nisus developers. Regards, Jerry On Tuesday, Oct 15, 2002, at 10:16 America/New_York, Mark Smith wrote: > At Tue, Oct 15, 2002, the nimble fingers of Rick Davis typed the > following: > >> I wonder if this "drawer" feature is a characteristic of OS X. Mail >> and >> Preview use them, and maybe other apps as well, although these two >> come >> to mind immediately. > > I am not sure if they are compulsory, but "drawers" are a Cocoa thing. > Other examples include, the ubiquitous OmniWeb (<http:// > www.omnigroup.com/applications/omniweb/>) and WordLookup (<http:// > www.lindesay.co.nz/page_products.shtml>). For simple things like a > Bookmarks window, it can be useful, but I agree that it does not seem > very suitable for the number of settings that would be needed to define > paragraph styles, unless elements within the drawer are collapsible. > > -- > Mark Smith (InterLingual) > <http://www2.gol.com/users/mspsmith/> > Translation & Writing Solutions > 6-8-401 Asahigaoka, Ashiya, Hyogo 659-0012 > <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]> > -- __ Jerry W. Walker c o d e f a b - "High Performance Industrial Strength Internet Enabled Systems" [EMAIL PROTECTED] 212 462 1004 [116] office 212 462 1043 fax --------------------------------------------------- The Nisus Interactive List [EMAIL PROTECTED] Searchable archives: http://www.mail-archive.com/nisus-interactive%40nisus.com/ To unsubscribe from this list please send a message with "unsubscribe nisus-interactive" in the body of the email to [EMAIL PROTECTED]
