setValue vs setObject (NSMutableDictionary)
setValue vs setObject (NSMutableDictionary)
- Subject: setValue vs setObject (NSMutableDictionary)
- From: Mark Dawson <email@hidden>
- Date: Sun, 17 Apr 2005 14:28:50 -0700
I just wanted to double check the usage of setValue (and valueForKey) vs setObject. In example code, I see interchangeable usageā¦
(1) setValue is only in 10.3 & above
(2) Are the below two statements are equivalent (i.e., setValue can handle floats, ints, etc directly, while setObject must go through NSNumber)
[dict setValue:1.0 forKey:@"someFloatKey"]
[dict setObject:
[NSNumber numberWithFloat:1.0] forKey:@"someFloatValue]
_______________________________________________
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