Re: varibles in handler
Re: varibles in handler
- Subject: Re: varibles in handler
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 17 Jan 2011 17:21:00 -0600
- Acceptlanguage: en-US
- Thread-topic: varibles in handler
> 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
---------
_______________________________________________
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