• 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: Can someone explain this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can someone explain this?


  • Subject: Re: Can someone explain this?
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Sat, 14 Mar 2009 11:02:10 -0400


On Mar 14, 2009, at 10:32, Philip Aker wrote:

On 2009-03-14, at 07:21:58, Michelle Steiner wrote:

This works:

set the outputFile to (choose file name with prompt "Choose where to save the file" default name "test.txt" default location (path to desktop))
set myList to {"a", "b", "c", pi as text, "finished"}
set fref to open for access outputFile with write permission
write ((items 2 through end of myList) as text) to fref
close access fref


This doesn't:

set the outputFile to (choose file name with prompt "Choose where to save the file" default name "test.txt" default location (path to desktop))
set myList to {"a", "b", "c", pi as text, "finished"}
set fref to open for access outputFile with write permission
write ((items 2 through the end of myList) as text) to fref
close access fref

I can confirm this error on 10.5.6. Sounds like a parsing bug to me. You can reduce the problem to:

set myList to {"a", "b", "c", pi as text, "finished"}
items 2 thru the end of myList

and file a bug report at <https://bugreport.apple.com/>.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.


Philip (and Michelle)

I do not know if this is a bug!
I believe this is a matter of  priorities

items 2 thru the end of myList

gets compiled as

items 2 thru "finished" (actually end of {"a", "b", "c", pi as text, "finished"})

try

items 2 thru (get the end of myList )

and you will get a similar error.

It is the same as saying that in AS

-3^2
--> 9.0

is a bug.
It is not, they have decided that the unary - is not a multiplication by -1.




Deivy Marck Petrescu
email@hidden



_______________________________________________
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: Can someone explain this?
      • From: "Mark J. Reed" <email@hidden>
    • Re: Can someone explain this?
      • From: Philip Aker <email@hidden>
References: 
 >Can someone explain this? (From: Michelle Steiner <email@hidden>)
 >Re: Can someone explain this? (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Can someone explain this?
  • Next by Date: Re: Can someone explain this?
  • Previous by thread: Re: Can someone explain this?
  • Next by thread: Re: Can someone explain this?
  • Index(es):
    • Date
    • Thread