Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save as, export to: implementation




Le 5 déc. 04, à 21:12, Jeremy Dronfield a écrit :


On 5 Dec 2004, at 6:06 pm, Thomas Lachand-Robert wrote:

Hi all,

This is probably a very basic question, but I can't find the answer in the doc or the archive.
I want to export my app's document to PDF/HTML, so I implemented the NSExportableAs key as described in
file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/ Conceptual/Documents/Tasks/FAQ.html#//apple_ref/doc/uid/20000954
(BTW is it possible to do that in Xcode, instead of changing the info.plist file directly?)


Then I actually get an accessory view in the save panel, but the two new formats are greyed out in the popup menu and can't be selected! I don't understand why: is there something else to do to export in a different format?

Also a side question: do you think it's a good idea to use "Save as", taking into account that my app can't read the PDF/HTML files back? Maybe an "export" menu item would be clearer, but in that case, is there a simple way to run the save panel with the appropriate format selected?

Have you tried adding a "Save Copy As..." (or "Export" or whatever) menu item and connecting it to First Responder's -saveDocumentTo: action method? By default, "Save As" is connected to -saveDocumentAs:, which isn't quite the same thing.



Thanks for the suggestion, it actually does work! Starting form "saveDocumentTo:" instead of "saveDocumentAs:" does the trick. (I don't understand how it works,...) However, do you know how to the format popup is composed in that case, and if there is any way to preselect one item? It looks strange to have the normal format of documents in an "export" menu item.

Thanks again,

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet à la chose. >> Molière, Tartuffe.

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

This email sent to email@hidden
References: 
 >Save as, export to: implementation (From: Thomas Lachand-Robert <email@hidden>)
 >Re: Save as, export to: implementation (From: Jeremy Dronfield <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.