• 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: list as string - is this a bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list as string - is this a bug?


  • Subject: Re: list as string - is this a bug?
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 08 Sep 2005 11:24:03 -0700

On or about 9/8/05 11:08 AM, thus spake "Matt Deatherage"
<email@hidden>:

> On 9/8/05 at 11:20 AM, Matt Neuburg <email@hidden> wrote:
>
>> set L to {"hoo", "ha"}
>> L as string -- "hooha"
>> set L2 to {"hoo", item 2 of L}
>> L2 as string -- "hooha"
>> -- so far so good...
>> -- but now...
>> {"hoo", item 2 of L} as string -- "hoo"
>
> I vote bug and would guess reference problem.  Try this new ending:
>
> -- so far so good...
> -- but now...
> set L3 to {"hoo", item 2 of L} -- {"hoo", "ha"}
> {"hoo", item 2 of L} as string -- "hoo"
> L3 as string -- "hooha"
>
> My guess: internally, {"hoo", item 2 of L} is a list of a string and a
> reference, and the reference doesn't get converted to a string until it's
> assigned to something.

Something like this is right. You can also solve it by saying

{"hoo" (get item 2 of L)} as string -- "hooha"

This seems to confirm that the phrase "item 2 of L" is "just" a reference
until you do something with it. But I don't know whether that's a bug. m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide -
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/



 _______________________________________________
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: 
 >Re: list as string - is this a bug? (From: Matt Deatherage <email@hidden>)

  • Prev by Date: Re: list as string - is this a bug?
  • Next by Date: Re: list as string - is this a bug?
  • Previous by thread: Re: list as string - is this a bug?
  • Next by thread: Re: list as string - is this a bug?
  • Index(es):
    • Date
    • Thread