ludic.ui: a hole's text found by its pieces in the memo (built only when it first reads that way), avals left for the attributes read as text, a class's [root] made once, and a dev build's reload lets go of every file it read only to compare

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 01:29:02 +03:00
parent 6c663cc87b
commit ea5eedb5a5
10 changed files with 76 additions and 18 deletions

View file

@ -16,6 +16,7 @@ export property UiClass {
seen_xml: string = "" # the files as a developer's build last found them on disk
seen_lss: string = ""
use: UiTpl = null # screen_class.ludic: the element that shows it as a screen, made once
roots: []UiTpl = null # build_class.ludic: [root], for bd_kids
none: Val = null # and the empty model it is shown with
}
export function ui_register(ui_st: mut UiState, k: UiClass) -> int {
@ -52,8 +53,14 @@ function uc_reload(ui_st: mut UiState) -> bool {
if k.xml_path != "" and Fs.exists(k.xml_path) {
let x = lib_text(ui_st, k.xml_path)
var l = ""
if k.lss_path != "" and Fs.exists(k.lss_path) { l = lib_text(ui_st, k.lss_path) }
if k.seen_xml != "" and (x != k.seen_xml or l != k.seen_lss) {
let has_l = k.lss_path != "" and Fs.exists(k.lss_path)
if has_l { l = lib_text(ui_st, k.lss_path) }
if k.seen_xml != "" and x == k.seen_xml and l == k.seen_lss {
rl_let_go(x) # read only to compare, and the same: nothing keeps it (a dev build
if has_l { rl_let_go(l) } # asks every second, and each read was kept for good)
continue
}
if k.seen_xml != "" {
k.xml = x
k.lss = l
k.root = null