lua - Button removal in Corona -


i'm trying nest pages , such button presses in app working on. however, widget, carries on , such , must removed using display.remove() or :removeself. i'm trying make these buttons delete/remove view pressed , next page loaded, when either not work, or throws runtime error. suggestions?

edit: using, although leaves button gone permanently after click. `

local onbuttonevent = function (event )     if event.phase == "release"         display.remove( mybutton )         mybutton = nil         display.remove( buttongroup )         buttongroup = nil         storyboard.gotoscene( "shape" )     end end 

here's way. why don't set

mybutton.isvisible = false 

inside onbuttonevent function.

and i've never used storyboard, i'm pretty sure there event fired ("willenterscene" think) when enter scene.

so can set mybutton.isvisible = true there


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -