How can I get my window with tableview to show immediately?
How can I get my window with tableview to show immediately rather than having user wait?
The tableview is dependent data that takes awhile to compute so I would prefer to have window with a progress indicator appear immediately. I have selected "Visible at launch" within the Attributes inspector, yet the window doesn't load until the computed data is finished--about 20 seconds.
Don’t load the tableView immediately on launch—just have the window show with the tableView empty.
Later, in your application delegate’s:
- (void)applicationDidFinishLaunching:(NSNotification *)notification;
method (or in a document didLoad method) fire off the loading of your data.
A solution was to run my slow computation method on a separate thread by using this:
[self performSelectorInBackground:@selector(analysizeAndSetDataForErrorWordList:) withObject:completeErrorWordList];
Within this method, however, I needed to call methods back on the main thread. I was able to do this with this:
[self performSelectorOnMainThread:@selector(addToErrorFoundArrayController:) withObject:thisData waitUntilDone:NO];
Now the window bearing the array controller-bound tableView no longer blocks but displays while it's being loaded with the processing data. Now my user is dazzled rather than confused.