mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
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:
parent
4126859bd5
commit
aa2e15e6f5
6 changed files with 62 additions and 43 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue