InstallScript, RemoveScript, and DeletionScript

Sample InstallScript and RemoveScript

These scripts are commonly used to register your application for certain system services (such as Find and Intelligent Assistance). Here is an example:

InstallScript := func(partFrame)
begin
   // for Find All
   RegFindApps(kAppSymbol);

   // for Intelligent Assistance
   packageFrame.taskTemplateID := 
      RegTaskTemplate(
      partFrame.theForm.taskTemplate);
end;
RemoveScript := func(partFrame)
begin
   // for Find All
   UnRegFindApps(kAppSymbol);

   // for IA
   if package.taskTemplateID then begin
      UnRegTaskTemplate(package.taskTemplateID);
      package.taskTemplateID := nil;
   end;
end;

An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996