【发布时间】:2020-10-22 17:01:10
【问题描述】:
我以编程方式创建了一个模型和一个确定模型外观的 UI 对话框。如果我按下 UI 中的按钮来生成模型,第一次它看起来完全符合预期,但如果我反复按下按钮,每次按下都会以不同的方式扭曲模型。这是 UI 按钮的常见问题吗?如果我在我的程序中调用该函数来生成模型,那没有问题,所以我不认为它是如何生成它的。这不是我第一次遇到这个问题。我以前的模型也发生了同样的事情。我的 UI 非常简单,看起来像这样。
try(destroyDialog ModelGenerator)catch()
rollout ModelGenerator "Model Generator" (
group "Controls" (
edittext myText "model options"
)
button createModelButton "Generate Model"
on createModelButton pressed do (
delete objects
generateModel (myText.text)
)
)
CreateDialog ModelGenerator 300 300
【问题讨论】: