home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-05 | 1.1 KB | 39 lines | [TEXT/ttxt] |
- // Copyright 1994 Apple Computer, Inc. All rights reserved.
- // by J. Christopher Bell, Newton DTS
-
- DefConst ('kAppSymbol, '|AutoRoute:PIEDTS|);
- DefConst ('kPrintFormat, '|borderFormat:AutoRoute:PIEDTS|);
- DefConst ('kOtherPrintFormat, '|otherPrintFormat:AutoRoute:PIEDTS|);
-
-
- // run at application install time
- // setup stuff the app may need before it is ever opened
- InstallScript := func(partFrame)
- begin
- local myApp := partFrame.theForm ;
-
- // put my routing frame in the global routing frame
- routing.(kAppSymbol) := myApp.myRoutingFrame ;
-
- // put my format in the root so it can be found
- GetRoot().(kPrintFormat) := BuildContext(myApp.myPrintFormat);
- // put my other format in the root so it can be found
- GetRoot().(kOtherPrintFormat) := BuildContext(myApp.otherPrintFormat);
- end;
-
-
- // run when application and/or card with app removed
- // cleanup routing stuff
- RemoveScript := func(packageFrame)
- begin
- // get rid of entry in global routing frame
- RemoveSlot(routing, kAppSymbol);
-
- // remove my print format
- RemoveSlot(GetRoot(), kPrintFormat);
-
- // remove my print format
- RemoveSlot(GetRoot(), kOtherPrintFormat);
- end;
-
-