What is the difference between Msg Box window / Script Window / Field?

Ken Ray kray at sonsothunder.com
Mon Oct 3 10:56:59 EDT 2005


On 10/3/05 3:22 AM, "Dave Calkins" <davecalk at intergate.com> wrote:

> I have been working with some ASCII controls and found that while the
> message box displays the controls  the Script window and fields do not.
> Why is that? On the engine level, what is the difference between them.
> I have a few speculative guesses, but nothing more.
> 
> on mouseUp
>    put empty into fld "Other Data"
>    put empty into fld "Field 1"
>    put empty into msg
>    repeat with c = 1 to 32
>      put numtochar (c) into line 1 of fld "Other Data"
>      get the htmltext of line 1 of fld "Other Data"
>      put "NTC    "  &  c  & "   =  " &  numtochar (c) & "    HTMLtext
> =  "  &  it  & cr after fld "Field 1"
>      put "NTC    "  &  c  & "   =  " &  numtochar (c) & "    HTMLtext
> =  "  &  it  & cr after msg
>    end repeat
> 
> end mouseUp
> 
> The values displayed on 10.3.8 in the field or the script window just
> show the generic place holding box while the message window displays
> most of the actual characters.
> 
> 
> It would be nice to see the actual characters in the scripting window.

Technically, there's nothing different between them - they are both field
objects. However what might be at work here is fonts - the message box may
use a different font than the script editor and it is the font that
determines how special characters are displayed.

Personally, unless you're only delivering for one platform, I'd suggest
*not* button high ASCII characters (or control characters) in a script, but
rather use numToChar instead.

Just my 2 cents,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list