Cocoa help needed FAST

turncoat

Registered
I made my own application, and I need it to have it's own file extension. (like .onk or something) It needs to still have the rtfd contents though, does anyone know what I can do to have my own extension like this?

I was looking at the build target, and I think the answer lies there, but the main problem is I dont know which file extensions I can change that won't effect the program functionality.
 
As long as the contents you're writing to file are rtfd, it doesn't matter what the file extension is. The file extension is just used to tell the OS what program "owns" that sort of document.

So, when you're saving it, you can give it whatever file extension you wish. Well, not any, any that isn't used by another program. ;)

However, your program does need to claim to own these. To do it, go to the Project menu in Project Builder, and choose Edit active Target (it'll have the name of the target after it).

That'll display the target stuff. You want to go down to Document Types (under Info.plist entries).

You don't have to fill in all the blanks there. You do need to fill in at least the Name field (any name that you want) and the Extension field (that's the extension you wish to use). You can optionally select an icon that any document with that extension will use.

Hope that helps!
 
Originally posted by Darkshadow
As long as the contents you're writing to file are rtfd, it doesn't matter what the file extension is. The file extension is just used to tell the OS what program "owns" that sort of document.

So, when you're saving it, you can give it whatever file extension you wish. Well, not any, any that isn't used by another program. ;)

However, your program does need to claim to own these. To do it, go to the Project menu in Project Builder, and choose Edit active Target (it'll have the name of the target after it).

That'll display the target stuff. You want to go down to Document Types (under Info.plist entries).

You don't have to fill in all the blanks there. You do need to fill in at least the Name field (any name that you want) and the Extension field (that's the extension you wish to use). You can optionally select an icon that any document with that extension will use.

Hope that helps!

Wow, thanks a lot, i'll try this out
 
Back
Top