ftp.nice.ch/pub/next/developer/objc/workspace/YourWS_Inspector.README

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

Your Workspace Inspector
an example of a custom Workspace Contents Inspector in 3.0


Greg Burd
8/27/92


What is this?
	This is an example of how you can create a dynamically loaded Workspace Contents inspector.  When you bring up the Workspace inspector and select inspect the Contents of a file, Workspace looks at the extension, and then if a class has registered to inspect that extension, it loads it into the inspector.

When should you use this?
	If you create a program that has some filename extension that you have registered with Developer Support at NeXT, and you would like to allow users of your program to view the contents of your files without launching your app, this is the avenue to take.  Like an inspector to handle Draw.app documents, etc.

How do I make one of my own?
	The important files are,
YourWS_Inspector.hm
	This is a subclass of WMInspector, which is defined in the header  file <apps/Workspace.h>.  It is this class that is loaded and is responsible for the creation etc., of you inspector.
YourWS_Inspector.nib
	This is the nib file that your subclass of WMInspector loads.  The content view of this window is loaded into the Workspace inspector, and the title of the Inspector's window becomes the title of that your window.

	So once you understand that, take a good look at the documentation on Workspace in these files:
	
	/NextLibrary/Documentation/NextDev/GeneralRef/19_WorkspaceManager/IntroWorkspace.rtf

	/NextLibrary/Documentation/NextDev/GeneralRef/19_WorkspaceManager/Classes/WMInspector.rtf

	In the Workspace intro file there is a step by step how to on how to make an inspector.  And you don't even have to do that much work now.  The code is already typed in for you.  :-)
	
Good Luck and have fun!

- greg
NeXT Developer Support

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