How to make default settings for file ?

Joined
Sep 16, 2008
Messages
11
Reaction score
0
Points
1
Hi all

Can anybody tell me how can i make default settings for a file created by my own application. When i open a file it will open default my application.

What settings i have to make for this, or is there any API in carbon.

Regards,
neha
 
Joined
Oct 22, 2007
Messages
8,967
Reaction score
287
Points
83
Location
London
Your Mac's Specs
Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
Right click on the file in question - select get info.

An info window for that file will open up, one of the options (about halfway down) is Open with

Select the application you want to open that file type, then select Change all

Now your app is the default editor of that file type
 
OP
N
Joined
Sep 16, 2008
Messages
11
Reaction score
0
Points
1
Thanks for the reply , but i want to do this programatically, is there any API for this.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
OP
N
Joined
Sep 16, 2008
Messages
11
Reaction score
0
Points
1
Thanks for the help, but i am not aware of Objective C, Is there any API in carbon.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
I don't know Carbon.

There may be some Cocoa API to set the default app to open when a file is double clicked on, but I don't know what it is. I've heard people have done it.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top