• 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: launch broken in Mt Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch broken in Mt Lion


  • Subject: Re: launch broken in Mt Lion
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 14 Jan 2013 16:29:52 -0600

On Jan 14, 2013, at 3:56 PM, Shane Stanley wrote:

On 15/01/2013, at 8:13 AM, Luther Fuller <email@hidden> wrote:

The handler someMenuItemHandler() calls other handlers which contain the line …

set selfRef to (path to me)

but this returns the correct path only if 'me' refers to the hostAppl. But in the script, above, the host code has been moved into menuItem.app and now returns the wrong path. Unfortunately, someMenuItemHandler must also work when called by Main.app, so I can't modify the code in Main.app.

Can you not pass the path as an argument to someMenuItemHandler()?


Of course I could. And I considered doing that ... until I realized that I would have to make the same changes to the script of Main.app which also uses someMenuItemHandler. This would make Main.app horribly complicated.

For example, in Main.app, I have a handler named "titleAndVersion()" which returns information for dialogs. Usually this information is not needed, but whenever it is needed any other handler can simply call it. If I pass this information as an argument, then I must first run a bunch of handlers, needed or not, before calling someMenuItemHandler which makes the code for calling someMenuItemHandler from Main.app unnecessarily complicated.

I have also considered some other solutions, but so far they all make simple code into something unnecessarily complicated.

The only real solution is for a really quick fix from Apple.


 _______________________________________________
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

  • Follow-Ups:
    • Re: launch broken in Mt Lion
      • From: Shane Stanley <email@hidden>
References: 
 >launch broken in Mt Lion (From: Luther Fuller <email@hidden>)
 >Re: launch broken in Mt Lion (From: Luther Fuller <email@hidden>)
 >Re: launch broken in Mt Lion (From: Luther Fuller <email@hidden>)
 >Re: launch broken in Mt Lion (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: launch broken in Mt Lion
  • Next by Date: Re: launch broken in Mt Lion
  • Previous by thread: Re: launch broken in Mt Lion
  • Next by thread: Re: launch broken in Mt Lion
  • Index(es):
    • Date
    • Thread