On 5/11/06, Richard Frith-Macdonald <[EMAIL PROTECTED]> wrote:
[...]
1. Creates an NSMessagePort instance
2. calls [NSMessagePortNameServer-registerPort:forname:] useing the
newly created port and a unique identifier for the bundle
[...]
That is exactly what I was trying to do:
- (id) init
{
id server = nil, port = nil;
server = [NSMessagePortNameServer sharedInstance];
port = [server portForName: @"Foobar"];
if( ! port )
{
NSLog(@"no port, creating");
port = [NSMessagePort port];
}
if( [server registerPort: port forName: @"Foobar"] )
{
NSLog(@"registered");
return self;
}
return nil;
}
Both instances will tell me that there is no port, therefor create a
new one and register.
--
Chris
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep