Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Multiple File Formats

Multiple File Formats
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Sep 15, 2002, 03:35 AM
 
In Cocoa, how do I accomplish multiple file formats? I want to create a text program that allows you to open several different file formats, and save a document in those formats as well, but I have no clue on how to accomplish this. I can save documents in one format, and open files of that same format, but I can't accomplish more than one.

I will also want to accomplish this in future programs (non text programs; possibly using custom file formats), so I need a way to do it that can be used for more than just text programs.

Thanks in advance.
     
Forum Regular
Join Date: Oct 2000
Location: Portland, OR USA
Status: Offline
Reply With Quote
Sep 16, 2002, 03:41 PM
 
The routines for reading/writing files in NSDocument have an argument that is the type of the file. You'll also have to add the file type to the bindings in the build settings. You could also have multiple instances of NSDocument with their own file types.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:47 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2