MiscTableScroll By Paul S. McCarthy and Eric Sunshine Copyright ©1995-1997 by Paul S. McCarthy and Eric Sunshine July 11, 1997 Overview This is the source code for the NEXTSTEP 3.x MiscTableScroll palette. MiscTableScroll is similar to NeXT's DBTableView and NXTableView classes. User Interface Features · Column and row titles. · Resizing of columns and rows. · Dragging rows and columns to rearrange them. · Automatic sorting of rows as columns are rearranged. · A button in column titles to toggle between ascending and descending sort direction. · Incremental search. · In-cell text editing. · Exporting contents as ASCII, ASCII-delimited or dBASE through the Save Panel. · Full keyboard and mouse control. · Interacts with the Pasteboard, Font Panel, and Services. Programmer Interface Features · Each column and row can have its own size. · Each cell can have its own color and font or inherit them from the MiscTableScroll. · Each column can have its own cell type. · Lazy mode for large or expensive-to-generate data sets. · Full control over selection. · Smart memory management ± you don't pay for features you don't use. · Simple indexed access to rows and columns regardless of visual order. · Uniform treatment of rows and columns ± referred to generically as slots. · Support for dragging images directly out of cells. · Extensive delegate hooks. Installation MiscTableScroll is normally distributed with the MiscKit. However, since it does not use nor rely on any other part of the MiscKit, it can be used as a stand-alone palette. Use this package to create a stand-alone palette or to replace an out-of-date copy of MiscTableScroll. Follow these steps to install the MiscTableScroll package: · Check version numbers · Remove previous version · Unpack · Compile and install palette · Compile the example programs (optional) · Clean up Check Version Numbers If you have a previous version of MiscTableScroll, check the version number of the MiscTableScroll palette that you already have by looking in the PACKAGE_NUMBER file in the source code directory or inside the palette itself. Compare that number with the version number encoded in the name of the file MiscTableScroll-NEXTSTEP.v???.s.gnutar.gz. This way you can tell which version is newer or older, and decide whether to proceed. Remove Previous Version If you have a previous version of the MiscTableScroll that you want to replace with this package, then you need to remove the old version before unpacking the new version. If you used the standard MiscKit directory structure then these commands will remove the previous version. If you used a different directory structure, then you will need to adjust the commands as necessary to match your installation. # Remove source % rm -rf /LocalDeveloper/Source/MiscKit/Palettes/MiscTableScroll \ /LocalDeveloper/Source/MiscKit/Documentation/Classes/MiscTableScroll.rtf \ /LocalDeveloper/Source/MiscKit/Documentation/Classes/MiscTableCell.rtf \ /LocalDeveloper/Source/MiscKit/Documentation/Classes/MiscExporter.rtf \ /LocalDeveloper/Source/MiscKit/Documentation/Classes/MiscIntList.rtf \ /LocalDeveloper/Source/MiscKit/Examples/LazyScrollDir \ /LocalDeveloper/Source/MiscKit/Examples/ScrollDir # Remove targets % rm -rf /LocalDeveloper/Palettes/MiscTableScroll.palette \ /LocalDeveloper/Libraries/libMiscTableScroll.a \ /LocalDeveloper/Headers/misckit/MiscTableTypes.h \ /LocalDeveloper/Headers/misckit/MiscTableScroll.h \ /LocalDeveloper/Headers/misckit/MiscTableCell.h \ /LocalDeveloper/Headers/misckit/MiscExporter.h \ /LocalDeveloper/Headers/misckit/MiscIntList.h \ /LocalDeveloper/Documentation/MiscKit/Classes/MiscTableScroll.rtf \ /LocalDeveloper/Documentation/MiscKit/Classes/MiscTableCell.rtf \ /LocalDeveloper/Documentation/MiscKit/Classes/MiscExporter.rtf \ /LocalDeveloper/Documentation/MiscKit/Classes/MiscIntList.rtf \ /LocalDeveloper/Examples/MiscKit/LazyScrollDir \ /LocalDeveloper/Examples/MiscKit/ScrollDir Unpack Unpack the MiscTableScroll package by choosing a convenient directory, such as /LocalDeveloper/Source, and performing the following commands: % mkdirs /LocalDeveloper/Source % cd /LocalDeveloper/Source % gnutar xvfz MiscTableScroll-NEXTSTEP.v???.s.gnutar.gz Unpacking the MiscTableScroll package creates the following directory structure: MiscKit Documentation Classes Examples LazyScrollDir ScrollDir Palettes MiscTableScroll Compile and Install Palette By default, MiscTableScroll is configured to install its components using the standard MiscKit directory structure: /LocalDeveloper/Palettes MiscTableScroll.palette. /LocalDeveloper/Libraries libMiscTableScroll.a. /LocalDeveloper/Headers/misckit Public MiscTableScroll headers. /LocalDeveloper/Documentation/MiscKit MiscTableScroll documentation. If any of these locations are inappropriate for your site, edit MiscTableScroll/Makefile.preamble and adjust them accordingly. The following make targets are defined in MiscTableScroll/Makefile.postamble: install Installs MiscTableScroll.palette. install_lib Installs libMiscTableScroll.a. install_headers Installs the public headers. install_docs Installs the documentation. install_all All of the above. You can build and install MiscTableScroll either from the command-line or via Project Builder. To build from the command-line, type: % cd /LocalDeveloper/Source/MiscKit/Palettes/MiscTableScroll % make TARGET_ARCHS="m68k i386 sparc hppa" install_all To use Project Builder, follow these steps: · Open the PB.project file contained within the MiscTableScroll source directory. · Choose the appropriate architectures from the Options panel. · Pick Add... from the Target pop-up control and add a target named install_all. · Press the Build button. Compile Example Programs (optional) You can build the example programs LazyScrollDir and ScrollDir either from the command line or with Project Builder. If you choose Project Builder then open the PB.project file from each example, select the appropriate architectures, and press the Build button. Otherwise, from the command line type: % cd /LocalDeveloper/Source/MiscKit/Examples/LazyScrollDir % make TARGET_ARCHS="m68k i386 sparc hppa" % cd ../ScrollDir % make TARGET_ARCHS="m68k i386 sparc hppa" Finally, if you would like to have the source code for the example programs installed in /LocalDeveloper/Examples/MiscKit, either copy the directories there using NeXT's Workspace or execute the following commands: % cd /LocalDeveloper % rm -rf Examples/MiscKit/LazyScrollDir Examples/MiscKit/ScrollDir % mkdirs Examples/MiscKit % cp -r Source/MiscKit/Examples/LazyScrollDir Source/MiscKit/Examples/ScrollDir Examples/MiscKit Clean Up At this point the installation is complete. To reclaim disk space, remove the temporary files which were created during the build process: % cd /LocalDeveloper/Source/MiscKit/Palettes/MiscTableScroll % make clean Or, if you do not plan to refer back to the source code, then you can delete that directory entirely: % rm -rf /LocalDeveloper/Source/MiscKit Documentation Documentation for the public classes can be found in the files: · MiscTableScroll.rtf · MiscTableCell.rtf · MiscExporter.rtf · MiscIntList.rtf The example programs demonstrate how to use the most important features of MiscTableScroll: · LazyScrollDir · ScrollDir The following files in the source directory also provide valuable information: PACKAGE_NUMBER MiscTableScroll version. HISTORY.txt Description of changes between different versions. TODO.txt A list of future enhancements. BUGS.txt A list of known bugs. Finally, the source code itself is commented and may be consulted as needed. Per the MiscKit guidelines, the source code has been formatted using tab-stops of 4 characters and indentation of 4 spaces. Conclusion MiscTableScroll was written by Paul S. McCarthy and Eric Sunshine and is copyright ©1995-1997 by Paul S. McCarthy and Eric Sunshine. It is included in the MiscKit by permission from the authors and is governed by the MiscKit license found in the file License.rtf in the MiscKit distribution. Please direct comments, questions, and complaints to: · Paul S. McCarthy <zarnuk@mcgh.org> · Eric Sunshine <sunshine@mcgh.org> NeXT, MIME, and ASCII mail accepted.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.