The command max width for label returns an unrealistically smal number when I supply it a list of 14 strings.
This code returns the measly 4.5 pt
set MaxLabelWidthParams to {"Playable on Apple TV 1st and 2nd gen.", "", "Creates a bitmap image file that contains raster graphics", "Creates a Virtual Reality movie for fast downloading", "Creates a QuickTime movie for streaming from a web-server", "", "", "", "", "", "", "", "Creates images from a movie frames and puts them in a separate folder", "Creates a text file needed to enable additional web-site content via URL in Safari"}
max width for labels MaxLabelWidthParams
…while the result of
set MaxLabelWidthParams to {"Choose a person", "Choose a company"}
max width for labels MaxLabelWidthParams
is ~120 pt. Why? Does the command accept more than 2 list members?
The variable returns 4.5 being defined as a property in my original script. It returns the correct value when set as a standard (local?) variable as in my OP. This subtle difference slipped my focus.
use script "Dialog Toolkit Plus" version "1.1.2"
set MaxLabelWidthParams to {""} --{"Playable on Apple TV 1st and 2nd gen.", "", "Creates a bitmap image file that contains raster graphics",
max width for labels MaxLabelWidthParams
The part that misrepresents the maximal width goes as following:
property MaxWidthLabelParams: {}
#{} is then populated by text items through a loop to arrive at {"Playable on Apple TV 1st and 2nd gen.", "", "Creates a bitmap image file that contains raster graphics", "Creates a Virtual Reality movie for fast downloading", "Creates a QuickTime movie for streaming from a web-server", "", "", "", "", "", "", "", "Creates images from a movie frames and puts them in a separate folder", "Creates a text file needed to enable additional web-site content via URL in Safari"}
property MaxWidthLabelValue: (max width for labels MaxWidthLabelParams)
This value is 4.5. However, when I repurpose both of MaxWidthLabelParams and MaxWidthLabelValue as local variables (local to the implicit run handler) I get the correct 490 value.
I sense I miss something. I verified that 4.5 is the width of the string “{}” assigned to MaxWidthLabelParams which the command takes as in max width for labels {} but don’t quite understand why the second action (looping) has no effect on its value.