Files
codex-bot e3e46068eb
Verify Tessera GUI / verify (push) Failing after 7m35s
Support shared-VM native windows and Page detachment
2026-10-21 18:11:58 +08:00

19 lines
765 B
Plaintext

// Both native windows use one Aster VM and one shared business object.
count = ui.state(0)
leftButton = Button("共享计数 +1")
leftConnection = leftButton.on("click",count.increment)
left = Page()
left.title = "主窗口页面"
left.render(Column(24,16,TextBlock("两个窗口操作同一个计数对象"),ui.textOf(count,"value"),leftButton))
other = Window()
rightButton = Button("另一个窗口 +1")
rightConnection = rightButton.on("click",count.increment)
right = Page()
right.title = "独立窗口页面"
right.render(Column(24,16,TextBlock("关闭窗口会解除 Page 归属,保留的对象仍可重开"),ui.textOf(count,"value"),rightButton))
right.open(other)
ui.window().setTitle("Endor Main")
other.setTitle("Endor Shared")
other.resize(960,640)