I have a controller class from which I call a method of model class. Now from this model class method I want to update textView object which is a data member of controller class continuously. I have method in the controller class to edit this textView. I tried creating a controller object from the model class method and edited the textView. Although I don't get any errors, but its not displaying the text in the textView. How do I get the model class use controller class method to display text continuously..?? Is it that I am creating a local controller object and referring to its textView instead of the original controller object.
Controller.m file:
- (void) notifyContentHasChanged:(NSInteger) block {
NSString *str;
str = [NSString stringWithFormat:@"Block Written Successfully: %d\n", block];
[data insertText:str];
}
Model.m file:
Controller * c = [[Controller alloc] init];
while (USB_SUCCESS(status)){
DfuBlockCnt++;
printf("\nBlocks Written Successfully: %d",DfuBlockCnt);
[c notifyContentHasChanged:DfuBlockCnt];
}