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
|
||||
|
||||
local results = {}
|
||||
local logCounter = 0
|
||||
|
||||
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")
|
||||
if el then
|
||||
el.inner_rml = table.concat(results, "\n")
|
||||
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 el = document:GetElementById(id)
|
||||
if el then
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"version": "1.0.0",
|
||||
"version_code": 1,
|
||||
"entry": "main.rml",
|
||||
"icon": "icon.tga",
|
||||
"description": "Tests sandbox APIs: timers, storage, JSON, crypto",
|
||||
"developer": {
|
||||
"name": "Mosis Team",
|
||||
|
||||
Reference in New Issue
Block a user