In the verb close

close=: nilad define                    NB. Terminate the app and close its 
window
                                        NB. 
----------------------------------------
try.                                    NB. closing window gives error if it's 
absent
  wd 'psel lobrow'                      NB. finds the right window
  wd 'pclose'
  wd 'reset'
catch.
end.
)

Why do you want the extra 'reset' after closing?  It will close all other 
windows as well.

an alternative for try-catch could be the adverse conjunction (::)

  wd ::0: 'psel lobrow;pclose'

Waiting for your next project.  ;-)

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to