0

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);

oberbaum
  • 2,451
  • 7
  • 36
  • 52

1 Answers1

4

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
  • 510,854
  • 105
  • 1,084
  • 1,005
  • yeah, my .h has #import #import . I have working address book calls in the same method, just I can not access the ABRecordRef. – oberbaum Jan 25 '10 at 11:44
  • @norskben: is the 3rd piece of code in your question the implementation of `-peoplePickerNavigationController:shouldContinueAfterSelectingPerson:`? – kennytm Jan 25 '10 at 11:50
  • 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' – oberbaum Jan 25 '10 at 11:51
  • 1
    @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 Jan 25 '10 at 11:53
  • Thanks, it was solved when I replaced NSLog(@"Contact Reference: %d", ABRecordRef); with NSLog(@"Contact Reference: %d", person); – oberbaum Jan 25 '10 at 11:55