• 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: Panther: AppleScript 1.9.2 Release Notes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Panther: AppleScript 1.9.2 Release Notes


  • Subject: Re: Panther: AppleScript 1.9.2 Release Notes
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 10 Nov 2003 15:46:44 -0800

On Nov 10, 2003, at 1:36 PM, Chris Page wrote:

On Nov 7, 2003, at 14:39, Chris Page wrote:

On Nov 7, 2003, at 04:29, christian vick wrote:

AppleScript applets now handle incoming events in a first-in, first-out manner. Prior to AppleScript 1.9.2, applets handled incoming events in a last-in, first-out manner. [2553648]

YES, YES, YES! This makes CGI development SO much easier, thanks to the AS team!

I don't understand. What was it doing before, and how was it not just broken for everything?

I mean, does "incoming events" mean all Apple events? If so, I'm surprised that LIFO ordering doesn't just break any script or application sending a series of events to a script. Or is that a rare-enough case that nobody ran into a problem?

It refers specifically to Apple events sent to an applet that are dispatched to the script (which, if I recall correctly, is all of them.) The thing that saves/saved applications sending a sequence of events is that most people send them synchronously -- they wait for the reply to come back before sending another one. Otherwise, the events could have wound up getting executed in reverse order, as the following demonstrates:

1. Save the following script as a stay-open applet named "speaker" and launch it:

to speak_slowly(x)
delay 1 -- simulated work
say x
end speak_slowly

2. Run the following script:

tell application "speaker"
ignoring application responses -- simulated asynchronicity
speak_slowly("one")
speak_slowly("two")
speak_slowly("three")
speak_slowly("four")
end ignoring
end tell

You'd expect to hear "one, two, three, four", and do in 10.3, but prior to that you get "four, three, two, one."


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Panther: AppleScript 1.9.2 Release Notes (From: christian vick <email@hidden>)
 >Re: Panther: AppleScript 1.9.2 Release Notes (From: Chris Page <email@hidden>)
 >Re: Panther: AppleScript 1.9.2 Release Notes (From: Chris Page <email@hidden>)

  • Prev by Date: Re: how to access the folder/directory popup button in the nav dialog
  • Next by Date: Re: Select some item of...
  • Previous by thread: Re: Panther: AppleScript 1.9.2 Release Notes
  • Next by thread: Can I bind a F Key to an AppleScript?
  • Index(es):
    • Date
    • Thread