Clean main

This commit is contained in:
Nick Bisby 2019-03-02 14:36:37 -06:00
parent 346cba23bc
commit 1b635a3b3b
No known key found for this signature in database
GPG Key ID: F6E0C4E6D0B5EB36
2 changed files with 16 additions and 47 deletions

View File

@ -1,35 +1,26 @@
sub Main() sub Main()
m.port = CreateObject("roMessagePort") m.port = CreateObject("roMessagePort")
if get_setting("server") = invalid then
ShowServerSelect()
' TODO - be able to submit server info
end if
' if get_setting("active_user") = invalid then
' screen = CreateObject("roSGScreen")
' screen.setMessagePort(m.port)
' screen.CreateScene("UserSignIn")
' screen.show()
' TODO - sign in here
' await_response()
' screen.close()
' end if
screen = CreateObject("roSGScreen") screen = CreateObject("roSGScreen")
screen.setMessagePort(m.port) screen.setMessagePort(m.port)
m.scene = screen.CreateScene("Library")
first_scene = "Library"
'Create a scene and load a component'
m.scene = screen.CreateScene(first_scene)
screen.show() screen.show()
librow = m.scene.findNode("LibrarySelect") if get_setting("server") = invalid then
libs = LibraryList() ' TODO - make this into a dialog
librow.libList = libs ' TODO - be able to submit server info
' ShowServerSelect()
end if
'librow.GetRowListContent() if get_setting("active_user") = invalid then
' TODO - make this into a dialog
' screen.CreateScene("UserSignIn")
' TODO - sign in here
end if
library = m.scene.findNode("LibrarySelect")
libs = LibraryList()
library.libList = libs
while(true) while(true)
msg = wait(0, m.port) msg = wait(0, m.port)
@ -46,31 +37,9 @@ sub ShowServerSelect()
scene = screen.CreateScene("ServerSelection") scene = screen.CreateScene("ServerSelection")
screen.show() screen.show()
'debug(scene)
await_response() await_response()
end sub end sub
sub debug(scene)
' TODO - find out why itemName.text is "Host" but still displays as empty
x = scene.findNode("config_server")
print
print scene.getallmeta()
print
for each x in scene.getall()
if x.id <> "config_server" then goto continuex
print x.id
print x.itemContent.labelText
print x.findNode("itemName").text
' This says "A" for both. the node and label are set properly...
' why is it empty on the screen
continuex:
end for
print
print scene.getallmeta()
end sub
sub await_response() sub await_response()
while(true) while(true)
msg = wait(0, m.port) msg = wait(0, m.port)