• 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: Coercion problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coercion problem


  • Subject: Re: Coercion problem
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 5 Jul 2005 08:21:18 -0700


On Jul 5, 2005, at 7:41 AM, Robert Poland wrote:
set newxdates to "" as string

<snip>

repeat with Index from 1 to 14
set xDay to item Index of xdates as text -- Tuesday, January 22, 2002 12:00:00 AM
if xDay = "0" then
set a to "0" as string
set newxdates to newxdates & a
else
set a to text item 2 of xDay as text -- January 22
set newxdates to newxdates & a
end if
end repeat
display dialog "Final newxdates = " & newxdates as string
--> " January 220000000 January 2300000"
end if
end tell
newxdates --> " January 220000000 January 2300000"

You defined newxdates as a string, so your results will be a string.

Define newxdates as a list
set newxdates to {}

-- Michelle

--
In theory, theory and practice are the same.
In practice, they're not. --Yogi Berra

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Coercion problem (From: Robert Poland <email@hidden>)
 >Re: Coercion problem (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Please comment my thoughts -- Need help with application for controlling Time attendance...
  • Next by Date: Re: Coercion problem
  • Previous by thread: Re: Coercion problem
  • Next by thread: Re: Coercion problem
  • Index(es):
    • Date
    • Thread