Re: Open a file when Application launch
Re: Open a file when Application launch
- Subject: Re: Open a file when Application launch
- From: Graham Cox <email@hidden>
- Date: Tue, 16 Jun 2009 15:54:18 +1000
On 16/06/2009, at 4:09 AM, Greg Guerin wrote:
rethish wrote:
I created a plist file to launch my application at the scheduled
time and
and its working well. But I need to load the saved project file,
when the
application launches.
How can I do it?
What are the procedures to do it?
This isn't a Cocoa question.
To be fair I think the OP means "one of my app's own data files" when
he says "Project file".
To do that, take a look at the methods of NSDocumentController,
specifically - (id)openDocumentWithContentsOfURL:(NSURL *)absoluteURL
display:(BOOL)displayDocument error:(NSError **)outError
If the app isn't document based, try overriding the application
delegate's -applicationDidFinishLaunching: for example.
--Graham
_______________________________________________
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