From: Alpha C. <alp...@gm...> - 2007-12-31 16:54:27
|
On Dec 31, 2007 6:50 AM, Patrick Hurley <ph...@gm...> wrote: > addrs = me.valueForProperty("Address") # => > #<OSX::ABMultiValueCoreDataWrapper:0xbf5d6 > class='ABMultiValueCoreDataWrapper' id=0x53b330> > addr = addrs.valueAtIndex(0) # => > #<OSX::NSCFDictionary:0xbf22a class='NSCFDictionary' id=0x53fe30> > addr["Street"] = "1234 Anystreet" # => "1234 Anystreet" > addr["Street"].to_s # => "1234 Anystreet" > addrs.replaceValueAtIndex_withValue(0, addr) # => > OSX::OCMessageSendException: Can't get Objective-C method signature > for selector 'replaceValueAtIndex:withValue:' of receiver > #<OSX::ABMultiValueCoreDataWrapper:0x1f2f2 > class='ABMultiValueCoreDataWrapper' id=0x51e640> > # ab.save Try using addrs = addrs.mutableCopy to get an ABMutableMultiValue that you can modify. You'll probably need to use me.setValue_forProperty to write the changes back to the person record. Also, you should probably be using the KABAddressProperty constant to access the addresses in the me.valueForProperty method. Regards, Alpha |