mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
b079d92227
commit
a42171feb3
3 changed files with 55 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue