From 1b635a3b3b15ebd538199fb7b7ba45bb13a895c3 Mon Sep 17 00:00:00 2001 From: Nick Bisby Date: Sat, 2 Mar 2019 14:36:37 -0600 Subject: [PATCH] Clean main --- components/mainlist.xml | 2 +- source/Main.brs | 61 ++++++++++------------------------------- 2 files changed, 16 insertions(+), 47 deletions(-) diff --git a/components/mainlist.xml b/components/mainlist.xml index 5621da35..c1147535 100644 --- a/components/mainlist.xml +++ b/components/mainlist.xml @@ -31,7 +31,7 @@ function setData() libs = m.top.liblist rowsize = m.top.rowSize - + n = libs.TotalRecordCount ' Test for no remainder diff --git a/source/Main.brs b/source/Main.brs index 3fa7cba9..d4eaefa7 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -1,35 +1,26 @@ sub Main() 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.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() - librow = m.scene.findNode("LibrarySelect") - libs = LibraryList() - librow.libList = libs + if get_setting("server") = invalid then + ' TODO - make this into a dialog + ' 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) msg = wait(0, m.port) @@ -46,31 +37,9 @@ sub ShowServerSelect() scene = screen.CreateScene("ServerSelection") screen.show() - 'debug(scene) - await_response() 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() while(true) msg = wait(0, m.port)