i have two different classes with named indexViewController and flashCardQuestionViewController.
in the index view controller i have table filled with an array.
now i am getting some data from the database..
-(void)getMultipleChoiceAnswer
{
if(optionid!=nil)
[optionid removeAllObjects];
else
optionid = [[NSMutableArray alloc] init];
if(optionText!=nil)
[optionText removeAllObjects];
else
optionText = [[NSMutableArray alloc] init];
clsDatabase *clsDatabaseObject = [[clsDatabase alloc] init];
sqlite3_stmt *dataRows = [clsDatabaseObject getDataset:"select optionID,OptionText from flashCardMultipleAnswer where questionId=1"];
while(sqlite3_step(dataRows) == SQLITE_ROW)
{
[optionid addObject:[NSNumber numberWithInt:sqlite3_column_int(dataRows,0)]];
[optionText addObject:[NSString stringWithUTF8String:(char *)sqlite3_column_text(dataRows,1)]];
}
sqlite3_finalize(dataRows);
[clsDatabaseObject release];
}
and i am calling this method in the ViewDidLoad Method Of the indexviewcontroller.
now i have another NSMutable array in the flashCardQuestionViewController named listNoOfOptionsInQuestion..
i want to fill listNoOfOptionsInQuestion with the array of indexviewcontrollers array optionText