Saved files

Member
Posts: 509
Joined: 2002.05
Post: #1
When my program saves files it saves them with a .newgame extension with

NSStrings's [stuff writeToFile:s atomically:NO];

Everything saves fine and I added a .newgame file type to my targets settings, but what do I need to do to make .newgame files open my application instead of text edit? I already have it set up so that if someone drags the file into my program it loads everything correctly. Do I need to save a creator code to the files I make or something?

Thanks
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #2
Since TextEdit doesn't usually open files with an extension of .newgame, you probably set up that association by doing it manually. You can go to the Get Info dialog box and change the default application and clicking on Change All. Of course, you may wish to test to make sure it works right in a fresh install on a different machine before release...

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
in your application's Info.plist you can set up what document types you handle.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #4
Isn't that what this:
Quote:I already have it set up so that if someone drags the file into my program it loads everything correctly.
does? Or maybe those are different things...

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Member
Posts: 509
Joined: 2002.05
Post: #5
Steven Wrote:Isn't that what this:
does? Or maybe those are different things...

I want double clicking to automatically choose my program, and to use the icon i assigned from my program. I'm just saying that if I manually choose my program everything works fine.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #6
Like OSC said, you can do it with the info.plist
Check sketch for an example, you need to add the icons to the target then you can add it to the Document Types section.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 509
Joined: 2002.05
Post: #7
unknown Wrote:Like OSC said, you can do it with the info.plist
Check sketch for an example, you need to add the icons to the target then you can add it to the Document Types section.

Wen I hit the view new post button for some reason OSC and Stevens first post were just skipped (I must have visited iDG and forgot to click this thread).

Sorry about that, I'll check the other info.plists. Thanks
Quote this message in a reply
Post Reply