Changeset 16 for trunk/Cocoa/F-Script Anywhere/Source/FSAApp.m
- Timestamp:
- 10/20/02 04:46:29 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/F-Script Anywhere/Source/FSAApp.m
r7 r16 106 106 } 107 107 } 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]; 109 115 } 110 116 … … 167 173 @end 168 174 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 169 188 @implementation FSAApp (PatchControllerDelegate) 170 189 … … 174 193 } 175 194 195 // this delegate method is never invoked in Mac OS X 10.2 unless I register for NSWorkspaceDidTerminateApplicationNotification 176 196 - (void) notifyProcessDeath:(pid_t)pid info:(NSDictionary*)info 177 197 {
Note:
See TracChangeset
for help on using the changeset viewer.