• 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: NSDocument saveDocumentAs with suggested name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument saveDocumentAs with suggested name


  • Subject: Re: NSDocument saveDocumentAs with suggested name
  • From: PGM <email@hidden>
  • Date: Wed, 1 Mar 2006 21:53:01 -0500

A simple way is to change the displayName as soon as the document is created, though this may not be exactly what you want. You can find a way to do this in the archive:

http://www.cocoabuilder.com/archive/message/cocoa/2005/7/11/141416

Best, PGM

On 1 Mar, 2006, at 10:36, Jim O'Connor wrote:

I need to suggest a file name when a user saves my file for the first time.

There was a hack for stuffing the desired text into the NSSavePanel directly, but the constant required was yanked from the headers so this appears to be a bad idea.

I can write my own "NSDocument  saveDocumentAs:" handler and use

NSSavePanel beginSheetForDirectory:file:modalForWindow:modalDelegate: didEndSelector:contextInfo:

But this requires I do some of the stuff which NSDocument saveDocumentAs: handles for me otherwise (file type popup for one).

What is the best solution for this problem? Best being most compatible and least work.


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


This email sent to email@hidden


_______________________________________________ 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
References: 
 >NSDocument saveDocumentAs with suggested name (From: "Jim O'Connor" <email@hidden>)

  • Prev by Date: Re: Commenting style
  • Next by Date: Re: Commenting style
  • Previous by thread: NSDocument saveDocumentAs with suggested name
  • Next by thread: immutable copy of NSMutableDictionary but not a deep copy
  • Index(es):
    • Date
    • Thread