Sorry: usual nonsense of trying to over-complicate matters; this works superbly;

on menuPick PHONT
      set the textFont of fld "fff" to PHONT
end menuPick

on mouseDown
   get the fontNames
   sort lines of it
   put it into btn "OM"
   set the label of me to "FONTS"
end mouseDown

Oh, and if one does this:

set the text of fld "fff" to PHONT

one ends up with the fontName in the field.

Richmond.

On 9/12/17 10:37 am, Mark Waddingham via use-livecode wrote:
On 2017-12-09 09:33, Richmond Mathewson via use-livecode wrote:
Can anyone tell me why this is not working?

on menuPick PHONT
   switch PHONT
      set the unicodeText of fld "fff" to PHONT
   end switch
end menuPick

on mouseDown
   get the fontNames
   sort lines of it
   put it into btn "OM"
   set the label of me to "FONTS"
end mouseDown

Without more context its hard to say - but you are using a switch without any cases - which I don't think works.

Also, unless PHONT is UTF-16 data, then you should be using text, and not unicodeText.

Warmest Regards,

Mark.

Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to