• 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: Lee Noble <email@hidden>
  • Date: Wed, 2 Nov 2005 11:57:18 +0000

has wrote:

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

Ok, that's what I have in place at the moment anyway. Thanks anyway.
Lee

_______________________________________________
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


References: 
 >Re: Combining event handlers (From: has <email@hidden>)

  • Prev by Date: Re: Calling a handler in ASS project from applescript
  • Next by Date: re. bundling [was: Re: How to work with XML data using System Events?]
  • Previous by thread: Re: Combining event handlers
  • Next by thread: Re: Calling a handler in ASS project from applescript
  • Index(es):
    • Date
    • Thread