I have tried many variations with no luck. I can NSLog the array and I get this:
HTML Code:
2011-07-17 00:54:54.886 Widgets[13444:207] <Widget: 0x5e2aad0> (entity: Widget; id: 0x5e0d8e0 <x-coredata://E64A0BCE-2344-4EE1-89CC-164ACD8995D6/Recipe/p115> ; data: {
success = 1;
coconutscarried = nil;
name = "African Swallow";
uidnumber = "105 ";
})
How can I simple set a text field?
Pardon the mess but this is an assortment of code I have tried (messy). The array and text field have been set up in .h/m and bound in IB
Code:
- (void)viewDidLoad {
[super viewDidLoad];
//NSLog(@"%@",[[swallowArray name] text]); // doesnt work
//NSLog(@"The string at index is %@.", [self.swallowArray objectAtIndex:0]);//nope...
for (int i = 0; i < [swallowArray count]; i++) {
//nameTextField.text = [[swallowArray objectAtIndex:i] uidnumber];
//NSLog(@"%@",swallowArray.name);
//}
//nameTextField.text = [[swallowArray objectAtIndex:0] uidnumber];
//NSString* strRate = [[swallowArray object] uidnumber];
nameTextField.text = [nameTextField.text stringByAppendingString:[NSString localizedStringWithFormat:@", %@", [[swallowArray objectAtIndex:i] name]]];
}
and many more. This has got to be dead simple, but I am kind of a noob.
thanks!
bo