• 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: varibles in handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: varibles in handler


  • Subject: Re: varibles in handler
  • From: Robert Poland <email@hidden>
  • Date: Mon, 17 Jan 2011 16:37:22 -0700

> On Jan 17, 2011, at 4:21 PM, Stockly, Ed wrote:
>
>
>
>> In the line "my setDelimiters(originalDelimiters)" originalDelimiters is a
> variable. It seems to be totally ignored by the handler.
>
> When you pass a variable to a handler the handler creates a local variable
> with the whatever label you include in the handler declaration. It does not
> use the variable name you include in your handler call.
> -------
> On run
> Set callVariable to "1"
> My foo ( callVariable )
> End run
>
> On foo (handlerVariable)
> Display dialog handlerVariable
> Display dialog callVariable -- will error out since it is not declared in
> the handler
> End
> ---------
>
> This is also true if you send a property to a handler.
> ----------
> Property callProperty: 1
> My foo ( callProperty )
> End run
>
> On foo (handlerVariable)
> Display dialog handlerVariable
> Display dialog callProperty -- will not error out since it is a property
> End
> ---------

Ed,

If you set callVariable as a global, as I did, it runs fine.


Robert Poland - Fort Collins, CO



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

This email sent to email@hidden

References: 
 >Re: varibles in handler (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: varibles in handler
  • Next by Date: Re: varibles in handler
  • Previous by thread: Re: varibles in handler
  • Next by thread: Re: varibles in handler
  • Index(es):
    • Date
    • Thread