• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Basic DO Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Basic DO Questions


  • Subject: Basic DO Questions
  • From: Richard Schreyer <email@hidden>
  • Date: Fri, 12 Jul 2002 15:05:46 -0700

I am trying to find my way around Distributed Objects between separate processes by putting together a couple small test apps.

I put together a simple DO Server app that really doesn't provide any functionality except for advertising it's presence.

The guts of the server:
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
NSLog(@"server will finish launching");

connection = [NSConnection defaultConnection];
[connection setRootObject: self];
[connection setDelegate: self];

if ([connection registerName:@"DO Test"])
NSLog(@"Registered name \"DO Test\"");
else
NSLog(@"failed to register name");
}

and of the client:
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
NSLog(@"client will finish launching");

serverProxy = [[NSConnection rootProxyForConnectionWithRegisteredName:@"DO Test" host:nil] retain];
[serverProxy setProtocolForProxy:@protocol(ServerProtocol)];
NSLog(@"server proxy is %@", serverProxy);
}

Sending the log on the last line will print out <Server, 0xSomething>, but then the program will crash with a SIGBUS soon after. What am I doing wrong here?

Richard Schreyer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Case *insensitive*
  • Next by Date: Keyboard focus.
  • Previous by thread: Re: Case *insensitive*
  • Next by thread: Keyboard focus.
  • Index(es):
    • Date
    • Thread