On Feb 8, 2009, at 4:52 AM, Gerriet M. Denkmann wrote:

When I build a Cocoa Project with 32/64 bit, this line gets a warning:
        NSSize a = NSMakeSize( 11.2, 22.4);
which went away using:
        NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4);
Is this the only and correct way to use NSMakeSize() ? Looks kind of ugly.

It's not. Either make them float constants, as others have pointed out, or keep them as double constants and build your 32-bit executables with the -fsingle-precision-constant C flag set.

A somehow related question:
How does one find out, in which mode (32 vs. 64 bit) an app is running? Both from inside of an app and from outside (I expected to see something in Activity Monitor -> Info but did not find any indication).

It is in Activity Monitor; you need to turn on the "Kind" table column (which is on by default in Leopard, but it wasn't in Panther or I think Tiger, so it's easy to miss). I'd like to know where it gets its information too...

How does one force a 32/64 bit app to run in 32 or 64 bit?


You can do that using the "arch" tool, or check/uncheck the box in the Finder Get Info window if it's an application.

Nick Zitzmann
<http://www.chronosnet.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