ftp.nice.ch/pub/next/developer/objc/fromnext/MiniExamples.91.9.s.tar.gz#/MiniExamples/ZooView/README.rtf

This is README.rtf in view mode; [Download] [Up]

ZooView
by Mary McNabb, NeXT Developer Support Team

Overview

Get to know the Developer Support Team, and a few other shady characters with the ZooView mini-example! In this application select a name from the list in the browser, and instantly see a photograph of that person! 

Besides getting to know the Developer Support Team, this example creates a useful gadget called a SideSplitView. The SideSplitView object allows a window to be divided into to sections sitting side-by-side. The user can modify the widths of the size relative to one another just by dragging the divider. Somehow the appkit's NXSplitView overlooked the opportunity to be a more useful object by providing a setSideways: method. 

SideSplitView can be used to display and present information which has a left/right orientation rather than an up/down orientation.

Program Organization

How to build the nib files
The main window in the nib file contains 3 objects. The main object of interest is the SideSplitView object, which is created in IB by dragging out a custom view, and then changing its Class to be SideSplitView. SideSplitView must be connected to both of its subviews. The controller object must know the names of both of the subviews, and the SideSplitView. 

The controller object must be the delegate of the file's owner.

You must also add all of the tiff files to the project by dragging them into the icons suitcase.

User Interface
The glyph NXScrollKnob is used to indicate that the user can move the divider by dragging the knob with the mouse.

Major Classes in the Application
SideSplitView	The object of interest. Maintains two subviews and allows the user to modify their widths by dragging the divider. 

RightSubView	Simple knows the name of a tiff image and blits it to the screen.

Controller	This object is used to initialize certain aspects of the application. It also serves as the delegate for the browser.

Topics Of Interest
A Valiant Effot: One developer tried to implement a sideways splitview in another manner. He subclassed NXSplitView and then rotated the subviews counterclockwise 90 degrees and the NXSplitView clockwise 90 degrees. In this way you would expect to get a sideways splitview. This is a very clever solution, however, it doesn't work because the NXSplitView uses compositing for the dimple and for the sliding divider. Some of the subview objects use compositing as well. Since compositing is not affected by the current CTM of the view, and thus ignores the rotation, this solution didn't work.

Interactions withVertical Retrace: As the user is dragging the divider, the mouseDown: method  sleeps for a small period of time before compositing the divider in its new position. This is done because of an unfortunate interaction between drawing on the screen and the vertical retrace of the monitor.

When developing this example the dragging of the divider seemed slower and more susceptible to glitches than the NXSplitView. After some testing it became apparent that the compositing was happening incongruently with the vertical retrace of the screen. There is no good way around it. However, we did come up with an acceptable way. By waiting an amount of time within a retrace period, the movement of the divider was somewhat more smooth. It makes dragging the divider in some areas of the screen appear better, and some appear worse. A questionable win.

Other Files
*.tiff		Images to display. The filename minus the .tiff suffix must match the string in "animals".

IB.proj		Files created by Interface Builder.
Makefile
ZooView.iconheader
ZooView.nib
ZooView_main.m

Change History

90 Sep 91		· Updated according to personnel changes.
		· Used MOUSEDRAGGED and MOUSEDOWN instead of LMOUSEDRAGGED and LMOUSEDOWN in mouseDown: method.
		· Used NX_COPY instead of NX_SOVER for the images. Still using SOVER for the dimple though.
		· Changed the color of the bar as it's being dragged.
		· Removed reference to non-public API.
pardtx960tx1920tx2880tx3840tx4800tx5760tx6720tx7680tx8640tx9600fi-1920li1920fc0 
Not valid  for 1.0
Valid for 2.0 

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.