Improve server startup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13067 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-03-10 08:05:25 +00:00
parent b079d92227
commit a42171feb3
3 changed files with 55 additions and 16 deletions

View file

@ -4,9 +4,7 @@
(The Tcp*Port classes, however, do test the notification mechanism
further.) */
#include <Foundation/NSNotification.h>
#include <Foundation/NSString.h>
#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/Foundation.h>
@interface Observer : NSObject
- (void) gotNotificationFoo: not;
@ -78,6 +76,16 @@ int main ()
postNotificationName: foo
object: o1];
[[NSDistributedNotificationCenter defaultCenter]
addObserver: observer1
selector: @selector(gotNotificationFooNoObject:)
name: foo
object: nil];
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName: foo
object: @"hello"];
[arp release];
exit (0);