About Archive Tag Cloud Translations RSS

You are writing a comment about Opening Files With Associated App in Cocoa, here is a quick summary:

Recently I spent a while trying to figure out how to open files in my Cocoa app. Not just open them, but have the correct application launch with that file as an argument. I knew that Carbon achieved this with LaunchServices, but was unsure about the Cocoa equivalent to LaunchServices. But, it turns out to be quite easy to use. (Hint: its <strong>NSWorkspace</strong>.)


You are responding to this comment written by jeremy on August 12th 2009, 14:34.

THANK YOU! You're correct, it isn't trivial to find this out. I have code to do this the old old way with FSSpecs, creating an alias from the spec and launching the alias, but I knew there had to be a cocoa way to do it! Thanks for posting this where I could find it via google!


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")