				OmniHTMLViewer

This is a simple example demonstrating how to use the OmniHTML framework to display HTML in an application.  You have open permission to use and reproduce this software according to the terms in OmniSourceLicense.html.  (We're quite flexible about those terms, so if you find our source license too restrictive for some reason please contact us.  We've accomodated every request to date.)

There are three classes in this project:

* OHVDocument is a NSDocument subclass which controls the loading of the HTML file.  It subclasses the necessary NSDocument methods so that we know what to load, then uses OWPipeline to convert an address (URL) to an OHDocument.  It asks the resulting OHDocument for an OHDocumentView to be displayed, which it hands to its OHVDocumentFrameView.

* OHVDocumentFrameView handles display of an OHDocumentView, sizing it appropriately and placing it in an OAScrollView (which automatically adds or removes scrollbars as necessary).  It also stubs out a bunch of methods that the document view calls to let its frame view know when its selected link changed, when the user wants to follow a link, etc.  (We don't do anything with these notifications in this trivial application.)

* OHVController is the application's delegate.  It implements one method, -applicationShouldOpenUntitledFile:, returning NO since we're a viewer not an editor (and thus don't ever want untitled windows).

Please note that this is example code, not production code.  In particular, if you decide to use this code in an application you should probably make sure that it isn't leaking memory:  I haven't verified that I'm shutting down the pipeline, releasing the document and its views correctly, or flushing the content cache.  (OmniObjectMeter would make this job a lot easier, but it isn't available for DP4 yet, sadly.)

Enjoy!  If you find this example useful, let me know!

				Ken Case
				kc@omnigroup.com
				May 28, 2000