I want to be able to run a text editor from my application, set by the user in the TEXT_EDITOR environment variable. Now, considering that there is nothing in this variable, I want to use the TextEdit program that comes with OSX by default. Is it kosher for hardcode / Applications / TextEdit.app / Contents / MacOS / TextEdit in my application or is there a better way to invoke the program?
Edit: for writing, I am limited to running a specific application path in C. I do not open the path to the text file.
Edit 2: Seriously people, I do not open the file here. I ask for the application path for some reason.
source share