• 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
property in script object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: property in script object
      • From: Tommy Bollman <email@hidden>
    • Re: property in script object
      • From: Axel Luttgens <email@hidden>
    • Re: property in script object
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Rép: switch to Leopard …
  • Next by Date: Re: property in script object
  • Previous by thread: Rép: switch to Leopard …
  • Next by thread: Re: property in script object
  • Index(es):
    • Date
    • Thread