/*
**      Newton Developer Technical Support Sample Code
**
**      Auto Route, an example of the Send function.
**
**      by J. Christopher Bell, Newton Developer Technical Support
**
**      Copyright © 1995-1996 by Apple Computer, Inc.  All rights reserved.
**
**      You may incorporate this sample code into your applications without
**      restriction.  This sample code has been provided "AS IS" and the
**      responsibility for its operation is 100% yours.  You are not
**      permitted to modify and redistribute the source as "DTS Sample Code."
**      If you are going to re-distribute the source, we require that you
**      make it clear in the source that the code was descended from
**      Apple-provided sample code, but that you've made changes.
*/

InstallScript := func(partFrame)
	begin
		local myApp := partFrame.theForm ;
	
		// Don't use GetLayout(...) in form ("Application") part InstallScripts 
		// because it wastes much NewtonScript memory! See the CustomRoute 
		// sample for more info.
		
		// We get the routing formats from slots in our base view.
		// See the base view myFormats slot for the declarations...
		RegisterViewDef(myApp.myFormats.printFormat1, kDataSymbol);
		RegisterViewDef(myApp.myFormats.printFormat2, kDataSymbol);
		RegisterViewDef(myApp.myFormats.frameFormat, kDataSymbol);
	end;


RemoveScript := func(packageFrame)
	begin
		UnRegisterViewDef(kPrintFormat1Sym, kDataSymbol);
		UnRegisterViewDef(kPrintFormat2Sym, kDataSymbol);
		UnRegisterViewDef(kFrameFormatSym, kDataSymbol);
	end;
	