• 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
Re: cross-platform problem, possible applescript solution?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-platform problem, possible applescript solution?


  • Subject: Re: cross-platform problem, possible applescript solution?
  • From: Philip Aker <email@hidden>
  • Date: Sat, 17 Nov 2007 06:07:22 -0800

On 2007-11-17, at 04:05, Bengt Nilsson wrote:

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.

For a standalone app, you need to set up your application bundle's Info.plist properties for accepted document types and install some basic AppleEvent handlers before you call RunApplicationEventLoop() to receive a list of FSRefs to the dropped on documents. Maybe Qt already has some APIs for those AppleEvent handlers?


See the "Runtime Configuration Guidelines" from Apple for the Info.plist properties needed. Peek inside a standard application like TextEdit to get an idea. See the DTSShell Carbon example from the developer web site for a fairly complete handling of the aevt/odoc AppleEvent you want. Normally one doesn't need the directory recursion in the example.

If you're app is double-clicked and there are no documents, you should receive a text representation of your psn in argv[1]. See:

ps -axocommand


for what it looks like (i.e. "-psn_0_1703937"). However I don't think this is officially supported by Apple.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >cross-platform problem, possible applescript solution? (From: Bengt Nilsson <email@hidden>)

  • Prev by Date: Re: Leopard Date Bugs [don't overlook the japanese part]
  • Next by Date: Re: Leopard Date Bugs
  • Previous by thread: Re: cross-platform problem, possible applescript solution?
  • Next by thread: Re: cross-platform problem, possible applescript solution?
  • Index(es):
    • Date
    • Thread