Widget Button:setLabel() is undefined

Just want to make sure you saw this bug, it’s a fairly important function and most likely it’s just misnamed or the documentation is off or something.

http://developer.anscamobile.com/forum/2011/11/03/widget-buttonsetlabel-undefined
Thanks!

-Matt
W2MD [import]uid: 10211 topic_id: 17559 reply_id: 317559[/import]

Having the same problem. Is there a work around, such as a way to access to the text object directly? [import]uid: 61552 topic_id: 17559 reply_id: 67532[/import]

I think the workaround is to use the old ui.lua library. [import]uid: 10211 topic_id: 17559 reply_id: 67537[/import]

There going to be a widget update that addresses this bug (makes setLabel available), but in the meantime, here’s the workaround…

Access the text through the “label” property. So if you had a button called, ‘button’, you’d access it via:

button.label[/code]If your button's text is embossed, you'd use:button.label:setText( "new label" ).[/code]If not, then just modify the .text property:button.label.text = "new label"[/code]In the meantime, thanks for your patience while we get the widget buttons updated! [import]uid: 52430 topic_id: 17559 reply_id: 67604[/import]

Thanks!

-Matt
W2MD [import]uid: 10211 topic_id: 17559 reply_id: 67630[/import]

Yep, Thanks! [import]uid: 9048 topic_id: 17559 reply_id: 67743[/import]