On Dec 9, 2008, at 2:31 PM, Nick Zitzmann wrote:
On Dec 9, 2008, at 2:18 PM, development2 wrote:
int personFlags = [[addressItem valueForProperty:kABPersonFlags]
intValue];
That should be an NSInteger, not an int, and you should use -
integerValue instead.
Yeah thanks, saw that in the docs but forgot about it.
personFlags = (kABShowAsMask && kABShowAsCompany);
That should be one ampersand, not two.
Yeah I had changed that right after I sent the email out when I saw it
was wrong.
[addressItem removeValueForProperty:kABPersonFlags];
[addressItem setValue:[[NSNumber numberWithInt:personFlags]
stringValue] <<<<< Crashes HERE
forProperty:kABPersonFlags];
Why are you setting a string in that property? Remove the -
stringValue and change the +numberWithInt: to +numberWithInteger:
and it ought to work.
Well I was under the impression that all the property values you get
back form valueForProperty where strings. I stand corrected. It works
great now.
Thanks much.
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 [EMAIL PROTECTED]