/* JKD - 8/9/97 - Some of the following code came from the MiniMail code provided by Apple DTS */ InstallScript := func(partFrame, removeFrame) begin // We created a reference to our protoTransport object using // SetPartFrameSlot. See the "NewtPGPTransport.lyt" layout's beforeScript. RegTransport(kAppSymbol, partFrame.(kAppSymbol)); // Code for registering a field in the names app local dataDefSym := EnsureInternal('person); RegisterViewDef(GetLayout("PGP2PubKeyViewDef"), dataDefSym); end; RemoveScript := func(removeFrame) begin UnRegTransport(kAppSymbol); // Code for cleaning up PGP field in names app UnRegisterViewDef(kPGP2PubKeyViewDefSym, 'person); end; SetPartFrameSlot('DeletionScript, func(removeFrame) begin // If the user scrubs out the package, this function will be called. // We do NOT want to do this during debugging because it will be called often. // When you download a new version with NTK, it will delete the old one // and call it's DeletionScript. Note that DeleteTransport removes the preferences // for the transport! Here, you might want to delete your temporary data (in our // case, we might delete our temp soups entirely) if NOT kDebugOn then DeleteTransport(kAppSymbol) end);