Re: Choose from list change in AS 1.5.5
Re: Choose from list change in AS 1.5.5
- Subject: Re: Choose from list change in AS 1.5.5
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 15 Feb 2001 09:19:52 -0800
On 2/15/01 5:40 AM, "Michelle Steiner" <email@hidden> wrote:
>
There is a truncation at 255 characters, regardless of any other
>
situation.
>
>
The following applies to a screen resolution of 800 by 600 on an iMac; I
>
did not test to see if changing the resolution will affect the results,
>
nor did I test it on any other size of monitor.
>
>
In addition, There is a maximum of eight lines for the prompt, regardless
>
of the width of the dialog. The minimum width of the dialog is
>
equivalent to seventeen capital W or capital M characters (which are the
>
widest characters in the Chicago font) or 26 numerals (which are all the
>
same width in the Chicago font). Anything longer than eight lines at
>
whatever width the dialog is will be truncated; however, the
>
255-character truncation takes precedence.
I'm talking about something much shorter than that, Michelle. But it only
happens if you include a carriage return, I think. Here's one I use:
set addressTypeList to {"Default", "Work", "Home", "Ask"}
choose from list addressTypeList with prompt "CONTACT'S ADDRESS
Select one for contacts' addresses:"
That's a prompt of only 53 characters, including a carriage return, which
gets truncated as:
"CONTACT'S ADDRESS
Select one for contacts'" -- 42 characters
The original second line (35 characters) loses its final word. If I reduce
the second line to 33 characters, it doesn't get truncated.
There's no good reason for this truncation, only a bad reason. If I insert
one or more very long strings in the list, I get the full prompt without
truncation. As soon as one of the list items hits 30 characters, I get the
full prompt. This is ridiculous.
set addressTypeList to {"Default", "Work", "Home", "Long Long Long Long
Longe Name"} -- one line
choose from list addressTypeList with prompt "CONTACT'S ADDRESS
Select one for contacts' addresses:"
[prompt appears as:]
"CONTACT'S ADDRESS
Select one for contacts' addresses:"
Using a maximum list item length of 29 characters, if I shorten the first
line of the prompt to "CONTACT'S", nothing is altered. If I lengthen it to
"CONTACT'S ADDRESSES AND MOR", I get nothing at all in the second line line
of the prompt. The full prompt is truncated to:
"CONTACT'S ADDRESSES AND MOR
"
This is nuts. Here's how it appears to work:
If you put a carriage return into the prompt, then the prompt is truncated
if the second line has 34 characters or more, unless you have a list item
with 30 or more characters, and then it isn't truncated. If the maximum list
item length is 29 characters or less, then the second line of the prompt, if
over 33 characters, loses its final word(s) . But if the first line is
lengthened to 27 characters (or 28 if you include the CR character), then
the second line is completely removed (still with maximum list item length
of 29). As soon as a list item is extended to 30 characters. nothing is
truncated.
These figures are all so close to each other, that I expect they
restrictions are relative, not absolute. The short version is:
"If you put a carriage return into your prompt, there will be trouble."
>
>
The maximum number of items displayed in the list, without activating the
>
scroll bar, is 26.
That's about 15 better than it was pre OS-9.1 (max was 11, if I remember
correctly.)
--
Paul Berkowitz