drop-down button

Peter TB Brett peter.brett at livecode.com
Mon Nov 2 06:16:03 EST 2015



On 02/11/2015 11:01, Richmond wrote:
> On 02/11/15 12:46, Ian McKnight wrote:
>> Put the default keyword in and it should work fine
>>
>> switch FFFFONT
>> Default
>>    set the textFont of fld "OOT" to FFFFONT
>> end switch
>>
>> Regards
>>
>> Ian
>
> Thanks so much: quick and to the point.
>
> I wonder how newbies are going to find that one out?

By reading the documentation for "switch", presumably:

http://livecode.com/resources/api/#livecode_script/switch

Why do you need a "switch" here anyway?  Why can't you just do:

    on menuPick pFont
       set the textFont of field "OOT" to pFont
    end menuPick

                               Peter

-- 
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Open Source Team

LiveCode on reddit: https://reddit.com/r/livecode




More information about the use-livecode mailing list