Re: cross-platform problem
Re: cross-platform problem
- Subject: Re: cross-platform problem
- From: "Stefan Werner" <email@hidden>
- Date: Sat, 17 Nov 2007 12:06:02 +0100
On Sat, 17 Nov 2007 11:20:50 +0100, Bengt Nilsson
<email@hidden> wrote:
Hi!
I am trying to use the Qt cross-platform framework (www.trolltech.com)
to build aplications for Windows and OSX, and possibly Linux.
One problem with this is that Windows (and Linux?) is using main(argc,
argv[]) to pass the result of dropping-on-app or document double-click
to the application to open the documents, while OSX does not.
Please correct me if I am wrong.
So document double-click or drop-on-app just launches the OSX
application, but does not open any documents.
Again, please correct me if I have missed something.
OS X is seding drag and drop or document double clicks as Apple Events to
the application:
http://developer.apple.com/documentation/AppleScript/Conceptual/AppleEvents/responding_aepg/chapter_6_section_4.html#//apple_ref/doc/uid/TP40001449-CH206-BEJBDEGI
I think the easiest way would be install custom Apple Event handlers with
native Carbon code and guard it with #if TARGET_API_MAC_CARBON.
Cross-platform frameworks can only go so far and this is one spot where
the platforms differ conceptually. For example, if you drop a document on
the icon of an application that is already running, Linux and Windows will
usually open a new instance of that application where OS X sends an open
event to the already running instance.
-Stefan
--
"The good news is that in 1995 we will have a good operating system and
programming language; the bad news is that they will be Unix and C++."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden