Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Subroutines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subroutines



At 3:16 PM -0700 8/30/01, Jon Pugh wrote:
At 3:04 PM -0700 8/30/2001, Peter Boctor wrote:
I receive a kASSubroutineEvent/'psbr' event, but I'm unclear as to what I need to do with it.

Don't handle it. Return -1708 (errEventNotHandled) unless you plan on handling it. Don't touch the parameters. If they need to be "gotten" AppleScript will ask for them.

Generally, this will result in an error for the scripter, but that's because they should use "my subroutine()" instead of sending it to the app by placing it in a tell block.


I'm already returning errEventNotHandled and you're right, it results in an error, but adding my in front of the subroutine name does the right thing.

Thanks!
-peter


References: 
 >Subroutines (From: Peter Boctor <email@hidden>)
 >Re: Subroutines (From: Jon Pugh <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.