Getting errors in my appdelegate when I make my masterview declared it as globally.

Posted by monish on Stack Overflow See other posts from Stack Overflow or by monish
Published on 2010-03-20T06:21:08Z Indexed on 2010/03/20 6:31 UTC
Read the original article Hit count: 181

Filed under:

Hi Guys,

Here I am fighting with a problem couple of hours.

My problem is

Here is my code in appdelegate didFinishLaunching method.

#import "CorkItAppDelegate.h"


@implementation CorkItAppDelegate

@synthesize   window,isPicker,isFirstTime,winTyp,winTypId,wineCatName,wineRegName,theViewController,catId,regId,facebookObject,isGetWineName,getNewWineName,isNewWine,getNewWineReg,isNewReg,wineDetPk,currentLocation,internetConnectionStatus;
static NSString* mapCurrentLocationUrlArg = @"http://maps.google.com/maps?q=%s@";

- (void)applicationDidFinishLaunching:(UIApplication *)application
 {    

   // Override point for customization after application launch
    //facebookObject=[[FacebookMyLib alloc]init];
 [self createEditableCopyOfDatabaseIfNeeded];
 [self initializeDataStructures];

 [MyCLController sharedInstance].delegate = self;
 [[MyCLController sharedInstance].locationManager startUpdatingLocation];
 isGetWineName = NO;
 facebookObject = [[FacebookMyLib alloc] init];
 theViewController = [[[MasterViewController alloc] init]autorelease];
 UINavigationController* controller = [[UINavigationController alloc]     initWithRootViewController:theViewController];
 controller.navigationBar.barStyle = UIBarStyleBlackOpaque;
 [window addSubview:controller.view];
 [window makeKeyAndVisible];

}

here in this code I declared the MasterView controller globally in .h class. and it written property and synthesize for that. But when I run the build I am getting two errors at #import "MasterViewController" like

error:expected specifier-qualifier-list before 'MasterViewController'.

can anyone suggest me how to get rid of this.

Anyone's help will be much Appreciated.

Thank you, Monish.

© Stack Overflow or respective owner

Related posts about objective-c