How do I capture events of a frame that contains no enabled widgets?
My messagebox pops up in GUI only after I click the frame with my mouse. But this code is really for Character version, so no mouse is involved.
I'm guessing I need to somehow get the focus on the frame but I tried many ways and failed.
My messagebox pops up in GUI only after I click the frame with my mouse. But this code is really for Character version, so no mouse is involved.
I'm guessing I need to somehow get the focus on the frame but I tried many ways and failed.
Code:
[FONT=Courier New]def var c as char init "hello".[/FONT]
[FONT=Courier New]def frame f [/FONT]
[FONT=Courier New]c[/FONT]
[FONT=Courier New]with overlay no-labels col 1 row 2 size 10 by 10.[/FONT]
[FONT=Courier New]on "f5" of frame f anywhere[/FONT]
[FONT=Courier New]do:[/FONT]
[FONT=Courier New]message "f5 " view-as alert-box.[/FONT]
[FONT=Courier New]end.[/FONT]
[FONT=Courier New]view frame f.[/FONT]
[FONT=Courier New]disp c with frame f.[/FONT]
[FONT=Courier New]apply "entry" to frame f. /* <-- does not work */[/FONT]
[FONT=Courier New]apply "focus" to frame f. /* <-- does not work */[/FONT]
[FONT=Courier New]focus = frame f:handle. /* <-- does not work */[/FONT]
[FONT=Courier New]wait-for close of this-procedure focus frame f. /* <-- does not work */[/FONT]