• 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: Finding process path from Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding process path from Cocoa?


  • Subject: Re: Finding process path from Cocoa?
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 11 Dec 2009 10:06:08 +0100

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 (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

References: 
 >Finding process path from Cocoa? (From: Laurent Daudelin <email@hidden>)
 >Re: Finding process path from Cocoa? (From: Nick Zitzmann <email@hidden>)
 >Re: Finding process path from Cocoa? (From: Laurent Daudelin <email@hidden>)
 >Re: Finding process path from Cocoa? (From: "Sean McBride" <email@hidden>)
 >Re: Finding process path from Cocoa? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Anyone written a framework for setting xattr attributes?
  • Next by Date: NSBezierPath vs. NSImage
  • Previous by thread: Re: Finding process path from Cocoa?
  • Next by thread: Re: Finding process path from Cocoa?
  • Index(es):
    • Date
    • Thread