(main): Use new notification interface.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1094 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-07 18:15:50 +00:00
parent 88ce6294af
commit 6c6372b7f1

View file

@ -21,14 +21,15 @@ int main(int argc, char *argv[])
char namebuf[16];
printf("Looking up server object on localhost with name `secondserver'\n");
server = [Connection rootProxyAtName:@"secondserver"];
if (argc > 1)
server = [Connection rootProxyAtName: [String stringWithCString: argv[1]]];
else
server = [Connection rootProxyAtName: @"secondserver"];
printf("Found server.\n");
[NotificationDispatcher
addObserver: nil
invocation: [[[ObjectFunctionInvocation alloc]
initWithObjectFunction: announce_new_connection]
autorelease]
addInvocation: [[ObjectFunctionInvocation alloc]
initWithObjectFunction: announce_new_connection]
name: ConnectionWasCreatedNotification
object: nil];