Henry Rich wrote:
I put up a form and issue wd 'wait', but J doesn't wait for
an event on the form. Instead, it comes out of the wait with
an event on another form.
I found wd'wait' very difficult to use correctly especially when you also have
some system events such as timer and socket. You may trying providing callback
when child form closes.
In general the name of callback is known but you have to be determine its
locale.
scoreboard_prompt_button=: 3 : 0
wd NEWGAME
wd 'set matchlist *','cat',LF,'dog'
wd 'pshow'
)
scoreboard_ok_button=: 3 : 0
wd 'pclose'
)
prompt_callback=: 3 : 0
1!:2&2 y
)
newgame_ok_button=: 3 : 0
res=. wdq
wd 'pclose'
prompt_callback res
)
NEWGAME=: 0 : 0
pc newgame nomax nomin nosize owner;pn "Select Match, or CANCEL to Create a
Template";
xywh 11 7 183 16;cc matchlist listbox;
xywh 79 28 34 11;cc ok button;cn "OK";
pas 6 6;pcenter;
rem form end;
)
SCOREBOARD=: 0 : 0
pc scoreboard nomax nomin nosize;
xywh 79 8 34 11;cc prompt button;cn "PROMPT";
xywh 79 28 34 11;cc ok button;cn "OK";
pas 6 6;pcenter;
rem form end;
)
run=: 3 : 0
wd SCOREBOARD
wd 'pshow'
)
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm