On Mar 9, 2010, at 2:57 PM, Steve Mykytyn wrote:
> I know all about separating 10.6 from 10.5 stuff.  The problem is: I've been 
> testing on a 10.5 PPC machine, where everything works fine.  On 10.5 Intel, 
> it does not finish starting up, just crashes out.  Never gets anywhere that I 
> would use something 10.6 related.
> 
> Trying to be as clear as possible:
> 
> 10.6 Intel Snow Leopard - works fine
> 10.5 Intel Leopard - crashes complaining about NSRunningApplication
> 10.5 PPC Leopard - works fine
> 
> Even if the startup sequence for an app was different between PPC and Intel, 
> I'd expect to eventually crash out on both PPC and Intel if it was something 
> I'm doing in the source code.

I'm guessing that you crash on 10.5/Intel/Leopard/64-bit and do not crash on 
10.5/Intel/Leopard/32-bit.

If you write anything like this and run on a system where the class is not 
present, you will crash on 64-bit but may or may not crash on 32-bit:

   // BAD
   [NSRunningApplication someMethod];

If NSRunningApplication may be absent at runtime, then you must not refer to it 
directly, ever. You must use NSClassFromString() everywhere:

   // GOOD
   Class nsRunningApplicationClass = NSClassFromString(@"NSRunningApplication");
   [nsRunningApplicationClass someMethod];


-- 
Greg Parker     [email protected]     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to