Changing From The Old Widget To Widget 2.0

How am I supposed to implement something like this

local play\_button = widget.newButton{         default = "images/play\_button.png",         over = "images/play\_button-over.png",         width, height = 36, 36,         onRelease = doThis     } play\_button.x, play\_button.y = 0 + 50, 0 + 40; play\_button.scene = "play"; localGroup:insert(play\_button);  

using Widget 2.0?

After downloading the Corona SDK Starter my buttons became very, very strange!

Same here. I had to go back to build 992 since I need to release my update today or tomorrow and do not have enough time to test all the changes, check the doc about widget 2.0 and you will see that for instance over is now overFile I believe. Did not try to change my app but I think that should help. I have a lot of buttons so I will need sometimes before I can change them all and upgrade to 1076… Hope this help. Mo

Ah, thats it. “default” is now “defaultFile” and “over” is now “overFile”. Thank you.

I didn’t understand why you have had to go back to build 992.

Hi @WilerJr and Mo,

Please refer to the following forum thread about this.

http://forums.coronalabs.com/topic/33421-faq-updated-to-build-1034-or-greater-including-latest-public-release-widgets-no-longer-working-read-this-first/

Note that there’s a link to the “migration guide” to help you along. And remember that if you really need to keep using Widgets 1.0, you can, because it was open-sourced (linked to from the link above). I don’t recommend you do that, but if you need to, it’s a backup option.

Thanks,

Brent

Changing “default” and “over” to “defaultFile” and “overFile” has solved my problem. But If I got any other problems about the widget 2.0, I’ll take a look at the link you posted. Thank you, Brent.

THANKS Brent! Yes I am only going to keep widget 1.0 for the upcoming update simply because in addition to a lot of buttons to update I also need to deal with a scrollview widget. Not sure if I will have time to switch/test before I need to send it to Apple. We will see… Thanks again. Mo

Same here. I had to go back to build 992 since I need to release my update today or tomorrow and do not have enough time to test all the changes, check the doc about widget 2.0 and you will see that for instance over is now overFile I believe. Did not try to change my app but I think that should help. I have a lot of buttons so I will need sometimes before I can change them all and upgrade to 1076… Hope this help. Mo

Ah, thats it. “default” is now “defaultFile” and “over” is now “overFile”. Thank you.

I didn’t understand why you have had to go back to build 992.

Hi @WilerJr and Mo,

Please refer to the following forum thread about this.

http://forums.coronalabs.com/topic/33421-faq-updated-to-build-1034-or-greater-including-latest-public-release-widgets-no-longer-working-read-this-first/

Note that there’s a link to the “migration guide” to help you along. And remember that if you really need to keep using Widgets 1.0, you can, because it was open-sourced (linked to from the link above). I don’t recommend you do that, but if you need to, it’s a backup option.

Thanks,

Brent

Changing “default” and “over” to “defaultFile” and “overFile” has solved my problem. But If I got any other problems about the widget 2.0, I’ll take a look at the link you posted. Thank you, Brent.

THANKS Brent! Yes I am only going to keep widget 1.0 for the upcoming update simply because in addition to a lot of buttons to update I also need to deal with a scrollview widget. Not sure if I will have time to switch/test before I need to send it to Apple. We will see… Thanks again. Mo