Ignore:
Timestamp:
10/20/02 04:46:29 (22 years ago)
Author:
Nicholas Riley
Message:

F-Script Anywhere 1.1.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/FSAApp.m

    r7 r16  
    106106        }
    107107    }
    108     [[PatchController sharedPatchController] setDelegate:self];
     108    [[PatchController sharedPatchController] setDelegate: self];
     109    // In Jaguar 6C115, libPatch no longer delivers process death notifications to the application unless it registers for NSWorkspaceDidTerminateApplicationNotification.  (Process launch notifications are still received.)
     110    [[[NSWorkspace sharedWorkspace] notificationCenter]
     111        addObserver: self
     112           selector: @selector(applicationDidTerminate:)
     113               name: NSWorkspaceDidTerminateApplicationNotification
     114             object: nil];
    109115}
    110116
     
    167173@end
    168174
     175@implementation FSAApp (NSWorkspaceNotifications)
     176
     177- (void)applicationDidTerminate:(NSNotification *)notification;
     178{
     179    NSDictionary *userInfo = [notification userInfo];
     180    FSALog(@"Process terminated (pid %6d): %@\n",
     181           [[userInfo objectForKey: @"NSApplicationProcessIdentifier"] intValue],
     182           [userInfo objectForKey: @"NSApplicationName"]);
     183    // Don't do anything here, this is a dummy method triggered by a NSWorkspaceDidTerminateApplicationNotification
     184}
     185
     186@end
     187
    169188@implementation FSAApp (PatchControllerDelegate)
    170189
     
    174193}
    175194
     195// this delegate method is never invoked in Mac OS X 10.2 unless I register for NSWorkspaceDidTerminateApplicationNotification
    176196- (void) notifyProcessDeath:(pid_t)pid info:(NSDictionary*)info
    177197{
Note: See TracChangeset for help on using the changeset viewer.