views:

874

answers:

1

hi in the method

- (BOOL)peoplePickerNavigationController: (ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {

im trying to simply access ABRecordRef as a variable, but i keep getting the error

expected expression before 'ABRecordRef'.

I can already get names and company info, but not the ABRecordRef.

What I am doing is:

NSLog(@"Contact Reference: %d", ABRecordRef);

+1  A: 

Did you

#import <AddressBook/AddressBook.h>

? And what do you mean by

contactRef = [NSString stringWithFormat:@"%d", ABRecordRef]; 

? It doesn't make sense considering ABRecordRef is a type, not a number.

KennyTM
yeah, my .h has #import <AddressBook/AddressBook.h>#import <AddressBookUI/AddressBookUI.h>.I have working address book calls in the same method, just I can not access the ABRecordRef.
norskben
@norskben: is the 3rd piece of code in your question the implementation of `-peoplePickerNavigationController:shouldContinueAfterSelectingPerson:`?
KennyTM
i edited my 'what i am doing section' to make it simpler, what do i need to do to make NSLog(@"Contact Reference: %d", ABRecordRef); work? the error is still error: expected expression before 'ABRecordRef'
norskben
@norskben: But still you can't put `ABRecordRef` there. It is a *type*, not a *number*. Do you mean `NSLog(@"Contact Reference: %d", person);`?
KennyTM
Thanks, it was solved when I replaced NSLog(@"Contact Reference: %d", ABRecordRef); with NSLog(@"Contact Reference: %d", person);
norskben