Laying out text

J. Landman Gay jacque at hyperactivesw.com
Mon Feb 23 10:52:58 EST 2015


On February 23, 2015 5:16:51 AM CST, Terence Heaford <t.heaford at icloud.com> wrote:
>Tried it as:
>
>put measureText("testText”,templateField) into theTextWidth
>
>Wasn’t expecting it to work and it didn’t but should it have crashed
>LC?
>
>Would it be a good idea for it to work with the templateField?


Livecode should never crash, so this is worthy of a report.  That said, the templateField is a function and it needs to be preceded by "the". 

The measureText function only needs a reference to any object that has text properties, either its own or inherited. You could reference the card for those probably.  Or try it again with the templateField after assigning it the text properties you want. Might work. 
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list