/* ** Newton Developer Technical Support Sample Code ** ** VariRoute, a Newton 2.0 routing example ** ** by J. Christopher Bell, Newton Developer Technical Support ** ** Copyright © 1994-7 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; RegisterViewDef(myApp.MyFormats.viewFormat1, kMySimpleVariableSizeViewClass); RegisterViewDef(myApp.MyFormats.viewFormat2, kMyEditViewDataClass); RegisterViewDef(myApp.MyFormats.viewFormat3, kMyBigTextViewClass); end; // run when application and/or card with app removed // cleanup routing stuff RemoveScript := func(partFrame) begin UnregisterViewDef(kSimpleVariViewDefSym, kMySimpleVariableSizeViewClass); UnregisterViewDef(kEditViewViewDefSym, kMyEditViewDataClass); UnregisterViewDef(kBigTextViewDefSym, kMyBigTextViewClass); end;