ftp.nice.ch/pub/next/developer/resources/classes/MOKit.1.0.0.s.tar.gz#/MOKit_1.0.0/Examples/MODocArchitecture

English.lproj/
 
MODocArchitecture.iconheader
 
MODocArchitecture_main.m
[View MODocArchitecture_main.m] 
MOImageDocController.h
[View MOImageDocController.h] 
MOImageDocController.m
[View MOImageDocController.m] 
MOTestDocManager.h
[View MOTestDocManager.h] 
MOTestDocManager.m
[View MOTestDocManager.m] 
MOTextDocController.h
[View MOTextDocController.h] 
MOTextDocController.m
[View MOTextDocController.m] 
Makefile
 
Makefile.postamble
 
Makefile.preamble
 
PB.gdbinit
 
PB.project
 
README.rtf
[View README.rtf] 

README.rtf

MOKit docs,  Copyright ©1992, 1993, 1994 by Mike Ferris.  All Rights Reserved.
By Mike Ferris  --  February 20th, 1994

MODocArchitectureTest


NOTE:  Before building this, the MOKit library should already be built and present in the MOKit/Source directory or /LocalDeveloper/Libraries.  If the library has been installed in another location, you will have to edit the OTHER_LDFLAGS variable in the Makefile.preamble.

This example demonstrates the use of the document architecture classes (MODocController, MODocManager, and MODocType).

The example is a simple document based app which supports two different document classes.  The first is a simple word processing document type.  This class can read "rtf", "txt", "1", and extensionless files.  Everything but "rtf" is read as plain ascii.  "rtf" is read as rich text.  All the types but "1" can be saved.  The second docuemnt class is for images.  It supports reading "eps" and "tiff", but can only write "tiff".

Things to notice are the handling of the Document menu (notice the New and Open submenus, and how the other items are enabled or disabled properly.  Notice that untitled windows are numbered independantly of doc class, and locations are staggered independantly too.

Notice that if you open a file of a type that can't be saved, it ends up as an unititled window.  Notice that if you choose the Open item from the Document menu, you can open "tiff" "eps" "rtf" "txt" and all other file types supported.  Then try the items in the Open submenu and see that they only show the files which are supported by the specific class chosen.  The word processing class opens files with no type.  This means that any file is shown in the open panel (including "tiff" and "eps".  If you open a "tiff" file from the Open item, it will open as an image.  You can open it as an ascii file by choosing the word processing class's item in the Open submenu too.

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