• 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
Differences in referring to current script in Mavericks Cocoa-AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Differences in referring to current script in Mavericks Cocoa-AppleScript


  • Subject: Differences in referring to current script in Mavericks Cocoa-AppleScript
  • From: email@hidden
  • Date: Sat, 09 Nov 2013 16:34:54 -0700

Hello,

In Lion and Mountain Lion, I could add something like the following to the main script in a template application and it worked without problems:

performSelector_withObject_afterDelay_("finish", missing value, 20)
      -- or --
addObserver_selector_name_object_(me, "appQuit:", current application's NSWorkspaceDidTerminateApplicationNotification, missing value)

In Mavericks, the same application results in the selector or function not being found or a "Job appears to have crashed: Segmentation fault: 11" error.   The keyword "me" and the reference to the script doesn't seem to work the same in the main.scpt, so the target for the selector isn't right - is this a new behavior, or was it wrong before?

Manually instantiating a class or using the new script library works OK, but if I can't use these kinds of Cocoa methods in the main script, it kind of defeats the purpose of having it, or am I missing something?  Is the main.scpt just for regular (more or less) AppleScript?


Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Differences in referring to current script in Mavericks Cocoa-AppleScript
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: applescriptobjc-dev Digest, Vol 43, Issue 2
  • Next by Date: Re: Differences in referring to current script in Mavericks Cocoa-AppleScript
  • Previous by thread: Re: applescriptobjc-dev Digest, Vol 43, Issue 2
  • Next by thread: Re: Differences in referring to current script in Mavericks Cocoa-AppleScript
  • Index(es):
    • Date
    • Thread