Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handlers in applications



> There has to be a simple solution to this but it eludes me.
> 
> It appears that applications can't deal with simple condition handlers.  This
> example issues an Applescript Error "TextEdit got an error: Can't continue
> simplicity."  Same result for iPhoto 5.0.1 and iTunes...
> 
> tell application "TextEdit"
>         activate 
>         simplicity("testing")
> end tell 
> 
> on simplicity(xxx)
>         display dialog xxx
> end simplicity 
> 
> but this works...
> 
>     simplicity("testing")
> 
> on simplicity(xxx)
>         display dialog xxx
> end simplicity 
> 
> The first example will work by using a tell me to before simplicity but that
> seems unnecessary and kludgy.

Yes, you must use "tell me to" or "my", but it is not absolutely
unnecessary. What if the target app is (eg) an applet with a handler called
"simplicity"? How would you difference *your* "simplicity" handler from its
own? ;-)


jj

-- 
http://www.macscripter.net/
http://www.osaxen.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

References: 
 >Handlers in applications (From: Irwin Poche <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.