Hi Robert,
Sorry to be a complete pain in the neck with this.
My appDelegate .h file is:
Code:
#import <sqlite3.h> // Import the SQLite database framework
#import <UIKit/UIKit.h>
@interface iTravelv113AppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UINavigationController *navigationController;
// Database variables
NSString *databaseName;
NSString *databasePath;
NSMutableArray *countries;
NSString *airportname;
NSMutableArray *arrayOfCharacters;
NSMutableDictionary *objectsForCharacters;
NSMutableArray *arrayOfAirports;
// Array to store the country objects
NSMutableArray *airports;
}
@property (nonatomic, retain) NSMutableArray *countries;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
-(void)checkAndCreateDatabase;
+(sqlite3*)getNewDBConnection;
The appDelegate .m file is:
Code:
#import <sys/socket.h>
#import <netinet/in.h>
#import <arpa/inet.h>
#import <netdb.h>
#include <SystemConfiguration/SCNetworkReachability.h>
#import "iTravelv113AppDelegate.h"
#import "RootViewController.h"
@implementation iTravelv113AppDelegate
@synthesize window;
@synthesize navigationController;
@synthesize countries;
and so on...
I have a file which reads my SQL data and creates an ARRAY containing the record requested by the user. A part of the file is below:
Code:
// Create a new country object with the data from the database
Country *country = [[Country alloc] initWithName:aName countryName:aCountry capitalCity:aCapital
firstLang:aLanguageF secondLang:aLanguageS voltage:aVoltage freq:aFreq dialCode:aDialCode
currencyCode:aCurrencyCode currencyName:aCurrencyName currencySymbol:aCurrencySymbol
phonePolice:aPhonePolice phoneMedical:aPhoneMedical phoneFire:aPhoneFire countryFlag:aCountryFlag
countryKey:aCountryKey countryOutletType:aCountryOutlet
timeZone1:atimeZone1 timeZone2:atimeZone2 timeZone3:atimeZone3];
// Add the country object to the countries Array
[countries addObject:country];
appDelegate.countries = countries;
[country autorelease];
The part I am struggling with is assigning the content of the ARRAY to the "appDelegate.countries = countries". I know this is because I don't know how this is done even thou I have read and re-read your tutorial. Basically I am having a very thick head time.
Can you help me advance this issue a little further.