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.h" like
error:expected specifier-qualifier-list before 'MasterViewController.h'.
I got two errores they are at: In my MasterViewController.m the errors are genereated at #import"MasterViewController.h"
#import "MasterViewController.h"
//here I am getting 2 error:expected specifier-qualifier-list before 'MasterViewController.h'.
#import "CorkItAppDelegate.h"
#import"InfoViewController.h"
@implementation MasterViewController
And the code in CorkItAppDelegate.h is:
#import <UIKit/UIKit.h>
#import <sqlite3.h>
#import "wineDetails.h"
#import "wineTypes.h"
#import "WineCategoriesList.h"
#import "MyCLController.h";
#import "Reachability.h";
#import "WineRegion.h"
#import "EventsList.h"
#import"FBConnect/FBConnect.h"
#import"FacebookMyLib.h"
#import "MasterViewController.h"
@interface CorkItAppDelegate : NSObject <UIApplicationDelegate,MyCLControllerDelegate> {
MasterViewController* theViewController ;
UIWindow *window;
sqlite3 *database;
NSMutableArray* masterViewList;
}
@property(nonatomic,retain)MasterViewController* theViewController ;
@end
can anyone suggest me how to get rid of this.
Anyone's help will be much Appreciated.
Thank you, Monish.