I am apparently a little light on "variable scope" knowledge. I'm sure I've just got something out of place somewhere, but I can't quite pin it down. This is the only remaining error (currently) preventing me from building and testing my app.
Here's the method implementation where I'm getting the error:
The three "temp..." variables are declared in the RootViewController.h file (this method is from RootViewController.m). The "rule" variable is where I'm getting the following error: "rule undeclared: first use in this function."
"Rule" is actually a Core Data managed object that is created within the RootViewController; i.e., when a user clicks "Add", a new "rule" object is created and inserted into the managed object context, then the peoplePicker is called to allow the user to select a contact.
My question is, how do I actually get the selected contact's name and selected property back into my "rule" entity? I suspect I just have one or two things out of place, but I can't figure out what they are.
Thanks in advance for any advice you can offer.
Here's the method implementation where I'm getting the error:
Code:
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {
NSString* tempName = (NSString*)ABRecordCopyCompositeName(person);
ABMultiValueRef thisPhones = ABRecordCopyValue(person, kABPersonPhoneProperty);
NSString* tempLabel = (NSString*)ABMultiValueCopyLabelAtIndex(thisPhones,0);
NSString* tempNumber = (NSString*)ABMultiValueCopyValueAtIndex(thisPhones,0);
[rule setName:tempName];
[rule setNumber:tempNumber];
[rule setLabel:tempLabel];
return NO;}
The three "temp..." variables are declared in the RootViewController.h file (this method is from RootViewController.m). The "rule" variable is where I'm getting the following error: "rule undeclared: first use in this function."
"Rule" is actually a Core Data managed object that is created within the RootViewController; i.e., when a user clicks "Add", a new "rule" object is created and inserted into the managed object context, then the peoplePicker is called to allow the user to select a contact.
My question is, how do I actually get the selected contact's name and selected property back into my "rule" entity? I suspect I just have one or two things out of place, but I can't figure out what they are.
Thanks in advance for any advice you can offer.