• 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: KVC broken in 10.4.4 on Intel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVC broken in 10.4.4 on Intel?


  • Subject: Re: KVC broken in 10.4.4 on Intel?
  • From: Joe Jones <email@hidden>
  • Date: Sun, 29 Jan 2006 09:30:23 -0800

The problem isn't that Intel is broken, the problem is that you are passing an NSNumber to a message that is expecting a float. This works on PPC due to the way that the parameters are put on the registers that is not available on the register limited intel machine.

I am not sure what actually you can do to keep the message using a float parameter but changing that message to accept an NSNumber instead of a float should correct your problem.

Does anyone know how to use KVC with a non-ObjC type like float?

joe


On Jan 28, 2006, at 6:30 PM, Da Woon Jung wrote:

Hi,

On my PowerBook G4 (PPC), the following works fine:

- (void)setFaintestVisible: (float)aValue
{
  NSLog(@"%f", aValue);
}

//...elsewhere, inside a method...

[self setValue:[NSNumber numberWithFloat: 7.9f] forKey:@"faintestVisible"];

// Prints 7.900000


However on an Intel iMac (OS X 10.4.4), it apparently prints 0.00000.

Shouldn't this be allowed according to the KVC spec? I thought scalar
unwrapping was supposed to be something I took for granted:
(http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/DataTypes.html#//apple_ref/doc/uid/20002171)


I first experienced this problem on the Intel DTK I had access too,
but I assumed it'd be fixed on production Intel iMacs. I don't own an
Intel iMac (not for sale yet here :( , but my beta testers do, and
they report the above issue.

Cheers,
DW
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40omnigroup.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: KVC broken in 10.4.4 on Intel?
      • From: Jim Correia <email@hidden>
References: 
 >KVC broken in 10.4.4 on Intel? (From: Da Woon Jung <email@hidden>)

  • Prev by Date: Trouble refreshing iCal
  • Next by Date: Re: Finder integration or plug-in
  • Previous by thread: KVC broken in 10.4.4 on Intel?
  • Next by thread: Re: KVC broken in 10.4.4 on Intel?
  • Index(es):
    • Date
    • Thread