On 09.12.2009, at 23:49, Laurent Daudelin wrote:
> I guess that with Carbon not being ported to 64bits, NSRunningApplication was 
> needed. It just makes life a little harder if you have to support both 10.5 
> (which doesn't have NSRunningApplication but has Process Manager) and 10.6 
> (which has NSRunningApplication but doesn't support Process Manager in 
> 64bits)...

 You can always write your code against NSRunningApplication, then implement 
your own class with the same method names as NSRunningApplication that uses the 
Process Manager under the hood. Use the pimpl pattern and #if __LP_64__ to make 
this class call through to NSRunningApplication whenever it's available (You 
can use NSClassFromString() to avoid link-time dependencies).

 If you're afraid Apple will remove the Process Manager from 32 bit, you could 
even put that class into an NSBundle, build two versions, one that uses the PM, 
the other that is a shim around NSRA, and then load the right one at startup 
depending on system version.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.lookandfeelcast.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to