Re: choose from list defaults
Re: choose from list defaults
- Subject: Re: choose from list defaults
- From: Robert Poland <email@hidden>
- Date: Sun, 25 May 2008 18:54:26 -0600
On May 25, 2008, at 6:35 PM, Michelle Steiner wrote:
On May 25, 2008, at 5:21 PM, Luther Fuller wrote:
However, the dictionary for 'choose from list' states ...
[default items list of text or number] : a list of items to
initially select (an empty list if no selection)
which would seem to indicate that this second line should work ...
set defaultItem to {2}
But ... it does NOT work. There is no default selection. Perhaps I
am misreading the dictionary or perhaps there is a(nother) bug here?
You're misreading the dictionary. It's a sublist of the items in
the first list. There is no item named "2" in the original list.
Try this:
set choices to {"meat", "potatoes", 2, "apple pie"}
set defaultItem to {2}
choose from list choices default items defaultItem
Or this:
set choices to {"meat", "potatoes", 2, "apple pie", 3}
tell choices to set defaultitems to its {item 1, item 3} & 3
choose from list choices default items defaultitems with multiple
selections allowed
With the last example, try entering a "p" for potatoes. NOTE, "meat"
remains selected.
This illustrates a BUG that has been with us since Leopard. No one
seems to have found a workaround for this yet.
Bob Poland - Fort Collins, CO
_______________________________________________
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