• 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: mmalcolm crawford <email@hidden>
  • Date: Mon, 30 Jan 2006 01:39:01 -0800

Summary: KVC (using non-deprecated methods) is *not* broken on Intel.


On Jan 29, 2006, at 11:38 PM, Da Woon Jung wrote:

I didn't know that you could call setValue:(id)aValue forKey:(NSString
*)aKey with a bare scalar value for aValue (which your above line of
code seems to achieve).

You can't.

According to the original Apple doc I quoted
(http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/DataTypes.html#//apple_ref/doc/uid/20002171),
it seems to make it fairly clear that I have to pass an id (NSObject
or any derived type, like NSNumber) and then "the [scalar] value is
extracted from the passed object using the appropriate -<type>Value
method".


This is correct.

Also, why _not_ use setValue:forKey:?  Do you have any _set<key>
setters in your code?
No, I'm using takeValue:forKey because I'm still targeting 10.2 for
ppc. An #ifdef would allow me to use setValue:forKey: for Intel
compiles, but would using setValue:forKey: make a difference?

What happens when you try?


I'm still looking for any documentation that says it would.

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Protocols/NSKeyValueCoding.html#//apple_ref/occ/instm/ NSObject/takeValue:forKey:>
states clearly that the method is deprecated and to use setValue:forKey: instead...


mmalc

_______________________________________________
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


References: 
 >KVC broken in 10.4.4 on Intel? (From: Da Woon Jung <email@hidden>)
 >Re: KVC broken in 10.4.4 on Intel? (From: Shawn Erickson <email@hidden>)
 >Re: KVC broken in 10.4.4 on Intel? (From: Da Woon Jung <email@hidden>)
 >Re: KVC broken in 10.4.4 on Intel? (From: Scott Ellsworth <email@hidden>)
 >Re: KVC broken in 10.4.4 on Intel? (From: Da Woon Jung <email@hidden>)

  • Prev by Date: Re: NSTreeController - setEntityName only settable once??
  • Next by Date: How to Publish My Application Meeting details to iCal and also to .Mac
  • Previous by thread: Re: KVC broken in 10.4.4 on Intel?
  • Next by thread: Re: KVC broken in 10.4.4 on Intel?
  • Index(es):
    • Date
    • Thread