Re: Property and variable
Re: Property and variable
- Subject: Re: Property and variable
- From: Emmanuel <email@hidden>
- Date: Fri, 3 Nov 2006 11:40:52 -0500
At 5:08 PM +0100 11/3/06, Jan Bultereys wrote:
Well if I use:
Set "variable1" to "variable2"
It won't be "available" in the handlers.
That's why I use property, unless there is an other way to make a
variable "available" in a handler?
1/ If you use Smile there are plenty ways to make things global. Our
preferred is to embed variables in a script, like we do with Graphic
Library, check:
/Applications/Smile/Smile.app/Contents/Resources/Class
Scripts/Context additions/Graphic Library
2/ Smile user or not, you can use the "global" declaration to have
all handlers share a variable:
-- tested
on handler1()
global myvar
set myvar to "hello world"
end
on handler2()
global myvar
display dialog myvar
end
handler1()
handler2()
-- will display "hello world"
Emmanuel
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden