I cannot understand the code you provided, but modal is missing <<
Names Default To Here(1);
If(
ex = New Window("Dialog() example",
<<Modal,
<<Return Result,
V List Box(
H List Box("Set this value", variable = Number Edit Box(42)),
H List Box(Button Box("OK"), Button Box("Cancel"))
)
);
ex["button"] == 1;
,
ex["variable"],
"CANCEL"
);
-Jarmo