• 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: Combining event handlers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Combining event handlers


  • Subject: Re: Combining event handlers
  • From: has <email@hidden>
  • Date: Wed, 2 Nov 2005 10:52:31 +0000

Lee Noble wrote:

>I may be wrong but I'm sure I'd seen in the dim and distant past back
>in OS8 that it was possible to combine handlers so you only need one
>block of code instead of two or more.

I think you're imagining it. Standard solution is to put the shared code into its own handler which the other handlers call as appropriate, e.g.:

on run
    doStuff(missing value, {})
end run

on adding folder items to actionFolder after receiving actionFiles
    doStuff(actionFolder, actionFiles)
end adding folder items to

on doStuff(actionFolder, actionFiles)
    ...
end doStuff


has
--
http://freespace.virgin.net/hamish.sanderson/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Combining event handlers
      • From: Lee Noble <email@hidden>
  • Prev by Date: Re: Find and replace string
  • Next by Date: Re: Calling a handler in ASS project from applescript
  • Previous by thread: Combining event handlers
  • Next by thread: Re: Combining event handlers
  • Index(es):
    • Date
    • Thread