Re: ABPeoplePicker Help Needed
Re: ABPeoplePicker Help Needed
- Subject: Re: ABPeoplePicker Help Needed
- From: Fritz Anderson <email@hidden>
- Date: Sat, 8 Sep 2007 10:14:35 -0500
Your question would be easier to answer if you clarified a few things.
- Unless my attempt to compile your code, and a search of the
documentation, greatly mislead me, there is no such class as
ABPeoplePicker, nor method as setDisplayedProperties:. Posting your
actual code, and not an approximation that can't exhibit your bug,
would be helpful.
- If ABPeoplePicker is a class of your own (and you shouldn't prefix
class names with prefixes used in system-supplied classes), then, once
again, you haven't supplied the code that actually crashes.
- Once we have the real code, some clue as to which line crashed, the
contents of variables at the time, and the first few (deepest) lines
of the stack trace would be helpful.
As an aside, I'm not sure why you use Core Foundation strings and
arrays, but that shouldn't contribute to your bug. The array you
choose doesn't retain its members, which will be disastrous in the
long run, but in the case of CF/NSString constants, isn't an issue.
— F
On Sep 7, 2007, at 9:22 PM, Mark Kieling wrote:
The code below seg faults with the data I pass it in array. without
calling setDisplayedProperties only contact names are sown, no
email, phone or other fields. what am I doing wrong?
- (void) pickPerson
{
struct CGRect screenRect = [UIHardware
fullScreenApplicationContentRect];
screenRect.origin.x = screenRect.origin.y = 0.0f;
// CFStringRef properties[] = { CFSTR( "kABEmailProperty" ) ,
CFSTR( "kABPhoneProperty" ) };
CFMutableArrayRef array = CFArrayCreateMutable( NULL, 1, NULL );
CFArrayAppendValue(array, @"kABEmailProperty");
ABPeoplePicker* picker = [[ABPeoplePicker alloc] initWithFrame:
screenRect];
[picker setAllowsCancel: YES];
[picker setPrompt: @"Select a recipient"];
[picker setAllowsCancel: YES];
[picker setDelegate: self];
[picker setDisplayedProperties: array];
[m_mainView addSubview: picker];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden