This is a very newbie question, and this is what I have done many times before, but there is something missing for me this time.
In my AppDelegate.h file, I declare NSArray and set it as a property:
@interface AppDelegate : NSObject {
NSArray *lines;
}
@property(readwrite, retain) NSArray *lines;
@end
And then in the AppDelegate.m file in the awakeFromNib method, I select it:
lines = [[NSArray alloc] init];
Then I have a method that sets up an array of strings:
NSString *fileContents = [NSString stringWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"Desktop/sometextfile.txt"] encoding:NSUTF8StringEncoding error:NULL];
lines = [fileContents componentsSeparatedByString:@"\n"];
I have an array controller associated with AppDelegate.self.lines, then I have a table column bound to Array Controller.arrangedObjects. I can confirm that the array is being updated (checked using NSLog), however the contents of the table are not updated (it remains empty).
Is there something obvious I'm missing here?