Temporary kludge to work around the problem is

  wd NEWGAME
  wd 'set matchlist *',matchnames
  wd 'pshow'
  whilst. -. 'newgame' -: (<'sysparent') 0 getklu 1 res do.
    wd 'wait'
    res   =: wd 'q'
    wd 'psel newgame'
  end.
  wd 'pclose' 


Henry Rich

the getklu fetches the 'sysparent' from the wdq structure


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Henry Rich
> Sent: Wednesday, December 20, 2006 9:33 PM
> To: 'Programming forum'
> Subject: [Jprogramming] wd 'wait' ineffectual in j6.01c
> 
> 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 display a form called 'scoreboard', and then I overlay it with
> a dialog that prompts for starting information, like so:
> 
> wd NEWGAME
> wd 'set matchlist *',matchnames
> wd 'pshow'
> wd 'wait'
> res   =: wd 'q'
> wd 'pclose'
> 
> (the NEWGAME form is very simple and is given below)
> 
> but the 'wait' is triggered immediately, and the variable 'res'
> is seen to be
> 
> +------------+---------------------------+
> |syshandler  |scoreboard_handler         |
> +------------+---------------------------+
> |sysevent    |scoreboard_pict00_focuslost|
> +------------+---------------------------+
> |sysdefault  |scoreboard_default         |
> +------------+---------------------------+
> |sysparent   |scoreboard                 |
> +------------+---------------------------+
> |syschild    |pict00                     |
> +------------+---------------------------+
> |systype     |focuslost                  |
> +------------+---------------------------+
> |syslocale   |base                       |
> +------------+---------------------------+
> |syshwndp    |220531754                  |
> +------------+---------------------------+
> |syshwndc    |12717636                   |
> +------------+---------------------------+
> |sysfocus    |                           |
> +------------+---------------------------+
> |syslastfocus|pict00                     |
> +------------+---------------------------+
>    
> so you can see what happened: the wait was satisfied by an event
> on the scoreboard form, to wit the focuslost event.  It's very
> repeatable and makes the wd 'wait' unusable.
> 
> Henry Rich
> 
> 
> 
> NEWGAME=: 0 : 0
> pc newgame nomax nomin nosize;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;
> )
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to