It looks like you're new here. If you want to get involved, click one of these buttons!
yes, g_deinitializePlugin is called when you press the stop button.
myView = uikit.createView() -- Or myView = New View()
myButton = uikit.createButton() -- Or myButton = New Button()
Won't bother you with LUA questions anymore.
If it's ok you, let me create a skeleton UI plugin with comments in it.