• 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: dumb question but vital
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dumb question but vital


  • Subject: Re: dumb question but vital
  • From: Helmut Fuchs <email@hidden>
  • Date: Tue, 10 Jun 2003 02:06:48 +0200

At 17:32 Uhr -0600 09.06.2003, Mick wrote:
set x to {}
set y to {}
set x to thisfilename
set y to y & x
class of item 1 of y -- returns "string"


any clues? what am i missing?

When concatenating two lists you get ONE list. When you are concatenating a non-list object to a list, this is automatically coerced to a single item list, before the operation takes place. So you get the illusion that the second parameter to & is appended regardless of type.

set x to {thisfilename} should do the job in your case, because you then concatenate a list containing one list.

HTH,

Helmut
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Get a size of an uploaded picture
  • Next by Date: Re: dumb question but vital
  • Previous by thread: Re: dumb question but vital
  • Next by thread: Re: dumb question but vital
  • Index(es):
    • Date
    • Thread