NSDocument app: combine multiple file contents to open one window instead of multiple windows
NSDocument app: combine multiple file contents to open one window instead of multiple windows
- Subject: NSDocument app: combine multiple file contents to open one window instead of multiple windows
- From: Gilles Celli <email@hidden>
- Date: Fri, 06 Apr 2012 16:39:23 +0200
Hi all,
My document-based application on Mac OS X reads ASCII data file to draw graphs based on date/time and y-values.
It reads the file contents by overriding readFromURL:ofType:error:
...
NSString *fileContents = [[NSString alloc] initWithContentsOfURL:absoluteURL
encoding:NSISOLatin1StringEncoding
error:outError];
….
It works and if a user opens multiple files there are of course separate files document windows, but I would prefer only one window:
I want to combine the selected multiple ASCII files from my app's Open Panel *without creating different windows*
but only one window so that we get just one big file to draw.
Of course an NSMutableArray is needed to add the different NSString then combine them etc.
So my question is:
Is it possible to combine multiple file contents for an NSDocument based app and if yes which method should I override,
or is there an NSApplication method to override ?
Any help is greatly appreciated.
Cheers,
Gilles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden