Presumably, this code should work:
[code]function group:close()
– Disable touch
group.state = false
– Slide out the object
group.transition = transition.to(group, { y = group.y + group.height, time = 200, onComplete = function()
– On complete, do this stuff
display.getCurrentStage():setFocus(nil)
group:removeSelf()
group = nil – ???
end} )
end[/code]
Basically, slide out, remove itself, and then nil out the data so that group ~= true. However, adding the nil line into the onComplete gives the error that group is nil as of the first command (group.state). This would strike me as completely out of order so I’m just wondering how Corona is interpreting the code and (presumably) where I’m making the order mistake.
[import]uid: 41884 topic_id: 32789 reply_id: 332789[/import]
[import]uid: 41884 topic_id: 32789 reply_id: 130399[/import]