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 1999-06-17 10:53:24 +00:00
parent a9c28e8013
commit eda1ff3d60
6 changed files with 62 additions and 43 deletions

View file

@ -687,15 +687,17 @@ static NSPortNameServer *defaultServer = nil;
{
if (handle)
{
[NSNotificationCenter removeObserver: self
name: GSFileHandleConnectCompletionNotification
object: handle];
[NSNotificationCenter removeObserver: self
name: NSFileHandleReadCompletionNotification
object: handle];
[NSNotificationCenter removeObserver: self
name: GSFileHandleWriteCompletionNotification
object: handle];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc removeObserver: self
name: GSFileHandleConnectCompletionNotification
object: handle];
[nc removeObserver: self
name: NSFileHandleReadCompletionNotification
object: handle];
[nc removeObserver: self
name: GSFileHandleWriteCompletionNotification
object: handle];
[handle closeFile];
[handle release];
handle = nil;
@ -721,9 +723,10 @@ static NSPortNameServer *defaultServer = nil;
* stop watching for connection completion.
*/
expecting = 0;
[NSNotificationCenter removeObserver: self
name: GSFileHandleConnectCompletionNotification
object: handle];
[[NSNotificationCenter defaultCenter]
removeObserver: self
name: GSFileHandleConnectCompletionNotification
object: handle];
}
}