• 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
Newbie Q : automatic creating & saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie Q : automatic creating & saving


  • Subject: Newbie Q : automatic creating & saving
  • From: email@hidden
  • Date: Sat, 27 May 2006 21:46:27 +0200 (CEST)
  • Importance: Normal

                                   Hello all,

 I've built an NSDocument-based ``uneditable" application (the main window
just displays the results of some computations in a table view, and
the computations go one step further when the user clicks on a certain
button). There are two features I should like to put in this application :

 -1) automatic naming and location when a document is first opened (instead
of beginning with an "Untitled" document that will ask the user where to put
the file at closetime, it should start with an already titled  document in a
fixed location, without asking the user anything).

 -2) The document saves itself automatically if the user closes it or
quits the
application.

 For 1) I added the following line in the windowControllerDidLoadNib:
method in
MyDocument.m :

 [self setFileURL : [NSURL fileURLWithPath :
@"/Users/ewan/Desktop/PrimesProgram"]];

 It doesn't work very well : after the application has launched I get a
sheet with
"The location of document ``PrimesProgram" cannot be determined. You can
specify where to save it" on it.

 I've no idea where to start for 2). The -close method in MyDocument
cannot be
overriden, can it ?

 What would the right way to do this in Cocoa ?

 Thanks in advance.

                                                                      Ewan


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Newbie Q : automatic creating & saving
      • From: "Klaus L. Greulich" <email@hidden>
  • Prev by Date: [SOLVED] How do I read RTFD files into a view?
  • Next by Date: Re: how do I check the defaults for an object?
  • Previous by thread: Problems with Java Applet in WebView
  • Next by thread: Re: Newbie Q : automatic creating & saving
  • Index(es):
    • Date
    • Thread