Re: problems with distributed objects
Re: problems with distributed objects
- Subject: Re: problems with distributed objects
- From: Eric Smith <email@hidden>
- Date: Sun, 14 Feb 2010 19:53:50 -0800
OK... never mind, everyone. When I saw my own post, I recognized the "autorelease" as the problem.
Eric
On Feb 14, 2010, at 7:48 PM, Eric Smith wrote:
> OK... I've got what must be a trivial problem. I'm running two applications on the same computer (intel iMac). I'm just cutting and pasting code from the XCode help pages, describing how to vend and obtain a distributed object. Code is below:
>
> Application #1:
>
> myConduit = [[ServerConduit alloc] init];
> conduitConnection = [[NSConnection new] autorelease];
> [conduitConnection setRootObject:myConduit];
> if ([conduitConnection registerName:@"rvserver"] == NO) {
> /* Handle error. */
> printf("\nno\n");
> }
>
>
> Application #2:
>
> id theProxy;
> BOOL valid;
> NSConnection* theConnection = [NSConnection connectionWithRegisteredName:@"rvserver" host:nil];
> theProxy = [theConnection rootProxy];
>
>
> All lines of App1 execute with no error, and there are no nil returned values.
>
> App2 gets a valid connection, but hangs when getting the rootProxy. It's so simple that it defies debugging! Can anyone help?
>
> Regards,
> Eric
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden