[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting running application
From: |
Chris B. Vetter |
Subject: |
Re: Detecting running application |
Date: |
Thu, 11 May 2006 17:05:18 +0200 |
On 5/11/06, Richard Frith-Macdonald <richard@tiptree.demon.co.uk> 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
- Detecting running application, Chris B. Vetter, 2006/05/11
- Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11
- Re: Detecting running application, Chris B. Vetter, 2006/05/11
- Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11
- Re: Detecting running application, Chris B. Vetter, 2006/05/11
- Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11
- Re: Detecting running application, Chris B. Vetter, 2006/05/11
- Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11
- Re: Detecting running application,
Chris B. Vetter <=
- Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11
- Re: Detecting running application, Chris Vetter, 2006/05/11
Re: Detecting running application, Richard Frith-Macdonald, 2006/05/11