fix sandbox test app: replace os.date, add goBack, remove missing icon ref
This commit is contained in:
Binary file not shown.
@@ -2,15 +2,26 @@
|
|||||||
-- Tests: timers, JSON, crypto, storage
|
-- Tests: timers, JSON, crypto, storage
|
||||||
|
|
||||||
local results = {}
|
local results = {}
|
||||||
|
local logCounter = 0
|
||||||
|
|
||||||
local function log(msg)
|
local function log(msg)
|
||||||
table.insert(results, os.date("%H:%M:%S") .. " " .. msg)
|
logCounter = logCounter + 1
|
||||||
|
table.insert(results, string.format("[%03d] %s", logCounter, msg))
|
||||||
local el = document:GetElementById("results")
|
local el = document:GetElementById("results")
|
||||||
if el then
|
if el then
|
||||||
el.inner_rml = table.concat(results, "\n")
|
el.inner_rml = table.concat(results, "\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Navigation helper
|
||||||
|
function goBack()
|
||||||
|
if navigation and navigation.back then
|
||||||
|
navigation.back()
|
||||||
|
else
|
||||||
|
log("Navigation not available")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function setStatus(id, status, success)
|
local function setStatus(id, status, success)
|
||||||
local el = document:GetElementById(id)
|
local el = document:GetElementById(id)
|
||||||
if el then
|
if el then
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"version_code": 1,
|
"version_code": 1,
|
||||||
"entry": "main.rml",
|
"entry": "main.rml",
|
||||||
"icon": "icon.tga",
|
|
||||||
"description": "Tests sandbox APIs: timers, storage, JSON, crypto",
|
"description": "Tests sandbox APIs: timers, storage, JSON, crypto",
|
||||||
"developer": {
|
"developer": {
|
||||||
"name": "Mosis Team",
|
"name": "Mosis Team",
|
||||||
|
|||||||
Reference in New Issue
Block a user