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

Re: List oddity


  • Subject: Re: List oddity
  • From: Tommy Bollman <email@hidden>
  • Date: Tue, 3 Aug 2010 12:43:20 +0200

Hello. This is a workaround:
set bar to {"A", "C"}
set hulu to item 1 of bar & "B" as text
display dialog hulu as text
-> "AB"

I think what happens is that first you get a reference to a list item from within a list, and a character value, since the the two
elements are not of the same type the result will be coerced into a new list, leaving us with a list of lists.

set foo to {item 1 of bar, "B"}
display dialog contents of foo as text
-->"AB"

By the way foo bar did originate from the *very* *part* of my world, it is spelled and pronounced "fua bar" I guess it wandered over the us through Brooklyn NY, where many Norwegians from my hometown immigrated. An english man or American would pronounce this like "foo bar", it means literally "bare ass", and that someone goofed. If you say about someone that he walks around with his bare ass here, then he has goofed in one way or another.

Totally aside. :-)

On 3 Aug 2010, at 06:55, email@hidden wrote:

>
>> I can't explain it, but I can reproduce it  - seeing the same thing on
>> 10.6.4 Intel Mac Mini.
>
> I can't explain it either.  Here's a bit more to ponder. Both Stan and Mark's 'get' suggestions work.
>
> I thought the need for a 'get' involved an application.
>
> ES
>
> set bar to {"A", "C"}
> set foo to {item 1 of bar, "B"} as text
> display dialog foo
> -->""
>
> set foo to get ({item 1 of bar, "B"}) as text
> display dialog foo
> -->""
>
> set foo to (get {item 1 of bar, "B"}) as text
> display dialog foo
> -->"AB"
>
> set foo to {1, item 1 of bar, "B"} as text
> display dialog foo
> -->"1"
>
> set foo to {1, get item 1 of bar, "B"} as text
> display dialog foo
> -->"1AB"
>
> set foo to {1, get item 1 of bar, item 2 of bar} as text
> display dialog foo
> -->"1A"
>
> set foo to {item 1 of bar, "B"}
> -->AB
> display dialog foo as text
>
>
>
> _______________________________________________
> 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
>

Best regards



Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
	If an idea can survive a bureaucratic review
	and be implemented it wasn't worth doing.

 _______________________________________________
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: List oddity
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: List oddity (From: "Stockly, Ed" <email@hidden>)
 >Re: List oddity (From: Michelle Steiner <email@hidden>)
 >Re: List oddity (From: Stan Cleveland <email@hidden>)
 >Re: List oddity (From: "email@hidden" <email@hidden>)
 >Re: List oddity (From: "Mark J. Reed" <email@hidden>)
 >Re: List oddity (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: List oddity
  • Next by Date: Re: List oddity
  • Previous by thread: Re: List oddity
  • Next by thread: Re: List oddity
  • Index(es):
    • Date
    • Thread