• 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
Re: problem with DO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with DO


  • Subject: Re: problem with DO
  • From: Greg Hulands <email@hidden>
  • Date: Tue, 22 Apr 2003 17:19:30 +1000

I think you would need to create an instance of NSConnection, not just
use the default connection.

eg

<code snippet>
//setup DO connection
NSSocketPort *sport = [[NSSocketPort alloc] initWithTCPPort:port];
if (![[NSSocketPortNameServer sharedInstance] registerPort:sport
name:serverName])
NSLog(@"Error registering with NSSocketPortNameServer");

connection = [[NSConnection alloc] initWithReceivePort:sport
sendPort:nil];
[connection setRootObject:self];

</code snippet>

HTH,
Greg
On Tuesday, April 22, 2003, at 04:03 PM, Lloyd Dupont wrote:

> this code sample (below) doesn't work (I mean registerName: return NO)
> what could be wrong ?
> does NSSocketPortNameServer require specific initialization ?
>
> id serverObject = [[Server new] autorelease];
> NSConnection * theConnection = [NSConnection defaultConnection];
> [theConnection setRootObject: serverObject];
> if([theConnection registerName:@"mon serveur a moi"
> withNameServer:[NSSocketPortNameServer
> sharedInstance]] == NO) {
> _______________________________________________
> 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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: problem with DO
      • From: Lloyd Dupont <email@hidden>
    • Re: problem with DO
      • From: Douglas Davidson <email@hidden>
References: 
 >problem with DO (From: Lloyd Dupont <email@hidden>)

  • Prev by Date: How to get my own icon when saving files?
  • Next by Date: Re: How to get my own icon when saving files?
  • Previous by thread: problem with DO
  • Next by thread: Re: problem with DO
  • Index(es):
    • Date
    • Thread