• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Open a file when Application launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Open a file when Application launch (From: Greg Guerin <email@hidden>)

  • Prev by Date: Drawing selection handles
  • Next by Date: Re: get ref to instance from IB
  • Previous by thread: Re: Open a file when Application launch
  • Next by thread: [iPhone] (newbie) navigation controller is null, combining navigation controller and tab bar controller
  • Index(es):
    • Date
    • Thread