• 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: Setting initial filename for Save As
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting initial filename for Save As


  • Subject: Re: Setting initial filename for Save As
  • From: Robert Martin <email@hidden>
  • Date: Tue, 13 Dec 2005 18:00:05 -0500

The reason I hacked this is because (in my app) the user has a choice of different formats to save the file in the Save panel. Each format is read by a different 3rd party app - and these apps have their own naming conventions - using values that would already be defined before a 'Save'. In other words, when a user selects a format, the file name is modified and displayed to be compatible with the format. It isn't possible to do this by simply seeding the initial value.


If you like living dangerously, there's a simple way to do this by using a category. I can't recommend it since it goes around NSSavePanel's API - and could break on the next OS update. However, it works for me...

Why doesn't using beginsheetfordirectory work for you to pass in the filename? I don't recommend using the private API.

corbin

_______________________________________________
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: 
 >Re: Setting initial filename for Save As (From: Robert Martin <email@hidden>)
 >Re: Setting initial filename for Save As (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Core Data, bindings & to-many relationship
  • Next by Date: Re: Core Data, bindings & to-many relationship
  • Previous by thread: Re: Setting initial filename for Save As
  • Next by thread: Re: Setting initial filename for Save As
  • Index(es):
    • Date
    • Thread