wip(0.S3): packages and examples migrated in one run - ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d490d4f9f1
commit
3eda72e8c2
172 changed files with 3094 additions and 2966 deletions
|
|
@ -9,21 +9,21 @@ program UiReload {
|
|||
const PATH: string = "build/ui_reload_example.xml"
|
||||
const V1: string = "<ui><screen name='note'><state n='{0}'/><button on-click='set n = n + 1'>{title} {n}</button></screen></ui>"
|
||||
const V2: string = "<ui><screen name='note'><state n='{0}'/><h1>{title} again {n}</h1></screen></ui>"
|
||||
function shown() -> string {
|
||||
let root: UiNode = ui_nodes("note", view_note())
|
||||
function shown(ui_st: mut UiState) -> string {
|
||||
let root: UiNode = ui_nodes(ui_st, "note", view_note())
|
||||
let first = root.children[0]
|
||||
if len(first.children) > 0 { return first.children[0].text }
|
||||
return first.text
|
||||
}
|
||||
entry {
|
||||
entry (ui_st: mut UiState) {
|
||||
Fs.write_text(PATH, V1)
|
||||
ui_load(PATH)
|
||||
let root: UiNode = ui_nodes("note", view_note())
|
||||
ui_press(root.children[0])
|
||||
let before = shown()
|
||||
let same = ui_reload()
|
||||
ui_load(ui_st, PATH)
|
||||
let root: UiNode = ui_nodes(ui_st, "note", view_note())
|
||||
ui_press(ui_st, root.children[0])
|
||||
let before = shown(ui_st)
|
||||
let same = ui_reload(ui_st)
|
||||
Fs.write_text(PATH, V2)
|
||||
let changed = ui_reload()
|
||||
print(`{before} | reloaded {same} then {changed} | {shown()}`)
|
||||
let changed = ui_reload(ui_st)
|
||||
print(`{before} | reloaded {same} then {changed} | {shown(ui_st)}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue