[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: SWT and open document event on Mac OS X
|
Hi, Oliver.
Does the following information help you?
http://www.eclipse.org/swt/macosx/
Carolyn
"Oliver" <mopr@xxxxxxxxx> wrote in message
news:gd532p$o0j$1@xxxxxxxxxxxxxxxxxxxx
> Dear all,
>
> I have an SWT application which I export into a Mac OS application bundle
> (.app) with the corresponding Eclipse export wizard.
>
> Now I would like to allow users to start my application by double-clicking
> NOT on the application icon but on a file with a certain extension. On
> Windows this is simple: the path of the file is passed as a command line
> argument to the java program. But Mac OS does not do this, but instead a
> "open document" event is sent. How can I catch this event when using SWT
> ?
>
> I am aware of the following two solutions:
> (1) com.apple.eawt.Application
> (2) MRJAdapter (available at http://homepage.mac.com/sroy/mrjadapter/ )
>
> These work fine in a small test program I have created. However, as soon
> as I add SWT to this they both no longer work. SWT seems to be
> incompatible with these.
>
> Is there a way to get the path of the file on which the user
> double-clicked when using SWT ?
>
> Thank you so much,
>
> Oliver