Re: An "Open With..." submenu...
Re: An "Open With..." submenu...
- Subject: Re: An "Open With..." submenu...
- From: Eric Wing <email@hidden>
- Date: Sat, 02 Apr 2011 22:39:35 -0700
On 4/2/11, Jason Harris <email@hidden> wrote:
> Hi All,
>
> Two related questions.
>
> (1) Managing the default application for documents from a "file manager"
> type of appication.
> (2) An "Open With..." menu.
>
With LuaCocoa, I have an example program called
HybridCoreAnimationScriptability which shows how to open a Lua script
file in the user's preferred text editor from the running application
and modify the script while the application is running.
The text editor code is in:
LuaCocoa/Samples/HybridCoreAnimationScriptability/TextEditorSupport.m
which can be found at
http://bitbucket.org/ewing/luacocoa
While this code isn't exactly what you are doing, it contains an
explicit mapping of text editors. The reason I did this is because I
wanted to not only open the text editor, but also open the text editor
to a specific line number. Since this is very custom to every text
editor, I need write special code for every editor. I've also used
this code in multiple projects and in some cases, I've used this basic
code to black list programs that hijack the extension (e.g. .lua) for
things that are completely unhelpful in my context (like Adobe
Lightroom).
But maybe this list will be useful to you, especially since I would
imagine jumping to specific line numbers would be useful in MacHG. I
would welcome additions to the text editor list too. It takes a long
time to research these features and I don't own all the editors out
there to test.
-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden