ftp.nice.ch/pub/next/developer/objc/dbkit/BooleanFormatter.README

This is the README for BooleanFormatter.92.9.s.tar.gz [Download] [Browse] [Up]

BooleanFormatter
by Mai Nguyen, NeXT Developer Support 
( Special thanks to William Shipley  for the original BooleanFormatter source code)

Overview

In order to run this example, you need to have an ORACLE server with a demo database installed.  You should install the OracleDemo.dbmodel from /NextDeveloper/Examples/DatabaseKit/Models into your ~/Library/Databases directory.
This example shows how to substitute the default display format in the TableView to your own format by subclassing the DBFormatter class. 
You can reuse the BooleanFormatter to display YES/NO instead of your boolean data. Note that in this example, customerID is used as a boolean column  just to show that this format works with integer data type. You should use real boolean data in your app.

Program Organization

Major Classes in the Application

 
TableViewController	A general manager object.  A subclass of the Object class.  Performs miscellaneous 		initialzations. 

BooleanFormatter	A subclass of DBFormatter.  Provides string display for boolean values and toggles these
		values by double-clicking.
		

Other Peculiarities
Note that the OracleAdaptor.adaptor is hardlinked into the program. To do this, you just drag and drop the OracleAdaptor.adaptor folder from /NextLibrary/Adaptors onto the Libraries icon of the Project Builder's Files window. You also need to add libdbkit_s.a into the Libraries icon of Project Builder  

Topics Of Interest

- How to replace the format of your tableview columns with a subclass of DBFormatter
See the files BooleanFormatter.[hm]

Change History
September 1992		Created for 3.0 Gold

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