You can't make assignments inside your class's interface.
Move the assigment to your app delegate's init method:
#import <UIKit/UIKit.h>
@interface TestRunAppDelegate : NSObject <UIApplicationDelegate> {
UITableView *mainTable;
}
@end
@implementation TestRunAppDelegate
- (id)init {
if( !(self = [super init]) ){
return nil;
mainTable = [[UITableView alloc] init];
return self;
}
@end
The @interface block (everything from @interface to @end) simply tells other code what to expect from your class. It doesn't do anything itself. Between the curly braces, you declare instance variables, but don't actually create any objects. After the instance variable declaration and before @end, you declare your methods. Again, you don't implement them. You're simply letting the compiler, and any other code that imports your header, know what they can expect your class to do.
The reason for separating the implementation and interface in this way* is to realize one of the tenets of object-oriented programming. An object essentially tells other objects what it can do (the interface), but makes no statement as to how it will accomplish a task (implementation).
*They are usually put into two separate files but don't actually have to be.