I looked a little bit today here with my application, and the term unresponsive for the Open Panel is not appropriate: it should be "stays open" when reading /processing the big data file and then the panel closes.
The main processing time is when converting date/time to NSTimeIntervalSince1970, and extracting data values..so a big ASCII data file can have > 500000 lines Simply put, the Open Panel should be closed, but it stays open until the data file has been processed and the data displayed as a graph. There should be a way to close NSDocument openPanel but didn't find anything about it… Any help is as always greatly appreciated :-) On 28 Jan 2013, at 18:44, Mike Abdullah wrote: > > On 28 Jan 2013, at 16:46, Gilles Celli <gilles.ce...@ecgs.lu> wrote: > >> Please don't be scared ;-) >> Well I'm little bit in a hurry … will look more closely tonight, but: >> >> What I've done til now is inside readFromURL:ofType:error: >> 1. Open the file and store it NSString currentFileContents >> 2. Process currentFileContents in a new object myDataFile (withc class >> DataFileParser) by extracting the data values etc. with NSScanner, this >> takes most time >> 3. return YES if everything is OK in readFromURL >> >> So I thought that then makeWindowControllers comes in action ?!... >> In makeWindowControllers: >> 1. Pass myDataFile if it's not nil > create a new MainWindowController and >> pass myDataFile to it like >> mainWindowController = [[DataViewerWindowController alloc] >> initWithDataFile:myDataFile]; >> [self addWindowController:mainWindowController]; >> >> Hope this clarifies a little bit what I'm doing…well doing something wrong >> ….. > > That all sounds totally reasonable to me. The point is you're saying the open > panel is making your app unresponsive. If the app's unresponsive, that means > the main thread is doing too much work. So you need to get from Instruments > or similar an answer to the question "what is the main thread doing that > takes so long?" > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com