views:

31

answers:

1

NSString *cel=@"text"; NSIndexPath *a = [NSIndexPath indexPathForRow:1 inSection:1]; CustomCell *c = (CustomCell *)[tableView cellForRowAtIndexPath:a]; c.yes.text = cel; I am using these line for updating the UITextfield placed on the tablecell ..... but it giving me some error like this

RootViewController.m:110: error: 'tableView' undeclared (first use in this function)

A: 

The compiler is telling you that tableView is unknown within the scope of execution of the calling function. If you have added a UITableView in interface builder then you need to add one to your class definition of RootViewController also like so:

@interface RootViewController:UIViewController< UITableViewDelegate, UITableViewDataSource> 
...

IBOutlet UITableView *tableView;

...
@end

@property (nonatomic,retain) IBOutlet UITableView *tableView;

and then in the implementation you add

@synthesize tableView;

In Interface Builder link the table view you have created to this tableView variable by right clicking (or control clicking) on the table view and dragging the line to the RootViewController line in the display window and select tableView from the pop up gray window.

twerdster