• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
cross-platform problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cross-platform problem


  • Subject: cross-platform problem
  • From: Bengt Nilsson <email@hidden>
  • Date: Sat, 17 Nov 2007 11:20:50 +0100

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.

I have tried to use an applescript "droplet" to collect the drop input list and then pass this to the application, and this actually works.
However, I do not know how to set this up correctly when combining the droplet executable and the Qt executable into the same bundle.
I want to set the path to the Qt app in the droplet script so that it finds it properly.

Here is a script that works, but it is of course useless because of the absolute path I used for testing:

on idle
(* Add any idle time processing here. *)
set j51command to "/Users/bnilsson/Programming/Qt/J51Viewer/build/Debug/J51Viewer.app/Contents/MacOS/J51Viewer"
do shell script j51command
quit
end idle

on open names
(* Add your script to process the names here. *)
set j51command to "/Users/bnilsson/Programming/Qt/J51Viewer/build/Debug/J51Viewer.app/Contents/MacOS/J51Viewer " & POSIX path of names
do shell script j51command
-- Remove the following line if you want the application to stay open.
quit
end open



Any comments or suggestions?

bnilsson
 _______________________________________________
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

  • Follow-Ups:
    • Re: cross-platform problem
      • From: Laurence Harris <email@hidden>
    • Re: cross-platform problem
      • From: "Stefan Werner" <email@hidden>
  • Prev by Date: Interface Builder Attributes Reference?
  • Next by Date: Re: cross-platform problem
  • Previous by thread: Re: Interface Builder Attributes Reference?
  • Next by thread: Re: cross-platform problem
  • Index(es):
    • Date
    • Thread