Updates for revised NSNotificationCenter

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4416 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-06-17 10:53:24 +00:00
parent 4126859bd5
commit aa2e15e6f5
6 changed files with 62 additions and 43 deletions

View file

@ -325,11 +325,11 @@ static NSDistributedNotificationCenter *defCenter = nil;
/*
* Ask to be told if the copnnection goes away.
*/
[NSNotificationCenter
addObserver: self
selector: @selector(_invalidated:)
name: NSConnectionDidDieNotification
object: c];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(_invalidated:)
name: NSConnectionDidDieNotification
object: c];
[remote registerClient: (id<GDNCClient>)self];
}
else
@ -376,9 +376,10 @@ NSLog(@"Connection to GDNC server established.\n");
/*
* Tidy up now that the connection has gone away.
*/
[NSNotificationCenter removeObserver: self
name: NSConnectionDidDieNotification
object: connection];
[[NSNotificationCenter defaultCenter]
removeObserver: self
name: NSConnectionDidDieNotification
object: connection];
NSAssert(connection == [remote connectionForProxy],
NSInternalInconsistencyException);
[remote release];