Scope Problem on Standalones
Richard Gaskin
ambassador at fourthworld.com
Tue Nov 29 10:56:42 EST 2005
David Burgun wrote:
> Hi,
>
> Firstly many thanks to Dave Cragg for telling me about the problems with
> the "answer" command. The documentation for the answer command says this:
>
> The prompt is a string (or any expression that evaluates to a string).
> The dialog box expands if necessary to fit the contents.
>
> However, this does not seem to be what happens in real life! In reality
> the promt string is truncated (not sure at what size the truncation
> takes place).
Perhaps both are true. Have you considered that there may be limits to
the width of the dialog? I don't know what Rev's limits are, but I do
know that if you try these in the Message Box:
answer "Hello"
answer "Hello there, good morning, howdy. This text is" \
&" arbitrarily long to test the auto-resizing of the answer" \
&" dialog. Seems to work, expanding the dialog to fit this text."
...you'll get two different sizes of the Answer dialog, the latter being
slightly wider and much taller.
I did notice an odd difference between the Answer dialog in Rev and its
counterpart in the MC IDE: In MC, you need to specify an icon in order
to get an icon, but Rev's answer dialog included the icon with the
syntax shown above, which does not tell it to use one.
Bug or design decision?
> So when I added the answer command to debug the Standalone, they would
> not work, even though the in the IDE the paths were displayed correctly.
> (Because the path strings were shorter in the IDE??? or becuase this bug
> only apprears in a Standalone? Anyone know?)
Ah, yes, long single-word values. There is a known limitation in the
engine currently which clips long strings with no spaces to the bounds
of the field rather than wrapping them.
I believe there may be a BZ request to wrap single-word values if you're
in a voting mood.
> Has anyone else encountered this problem? If so how do they get around it?
If a string is too long to display horizontally it's usually too much
information for the user to digest in a dialog. When I need to present
such things I usually make a custom window with both vertical and
horizontal scrollbars on the field.
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list