property in script object
property in script object
- Subject: property in script object
- From: KOENIG Yvan <email@hidden>
- Date: Tue, 29 Jun 2010 12:31:05 +0200
Hello
Here is a behaviour which surprised me.
If I run this script :
--{code}
property howto : missing value
repeat 2 times
my testeur()
end repeat
on testeur()
script o
log "howto 1 = " & howto
if howto is missing value then
set howto to "is defined"
end if
log "howto 2 = " & howto
end script
run o
end testeur
--{code}
log :
(*howto 1 = missing value*)
(*howto 2 = is defined*)
(*howto 1 = is defined*)
(*howto 2 = is defined*)
On pass 2, the property howto contains "is defined"
which is logical because properties are supposed to be persistant.
If I run :
--{code}
repeat 2 times
my testeur()
end repeat
on testeur()
script o
property howto : missing value
log "howto 1 = " & howto
if howto is missing value then
set howto to "is defined"
end if
log "howto 2 = " & howto
end script
run o
end testeur
--{code}
log
(*howto 1 = missing value*)
(*howto 2 = is defined*)
(*howto 1 = missing value*)
(*howto 2 = is defined*)
On pass 2, the property howto contains missing value.
So, in the script object, the property isn't persistant.
Is it the normal behaviour ?
Yvan KOENIG (VALLAURIS, France) mardi 29 juin 2010 12:30:51
_______________________________________________
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