Bill, Thanks for offering to look at my scripts. The main two are on the jwiki at these links.
http://www.jsoftware.com/jwiki/BrianSchott/code/turtleGraphics?action=AttachFile&do=view&target=tgsjbasic2.ijs http://www.jsoftware.com/jwiki/BrianSchott/code/turtleGraphics?action=AttachFile&do=view&target=tgsjutil.ijs Below are the two verbs I changed in tgsjbasic2.ijs . tgsj_run=: 3 : 0 PARTS=: i. 0 PARTSSTART=: 2000 LTurtlepath=: 1 if. #ogl do. free__ogl'' NB. force new rc wdpclose 'opengl' end. assert. 0=#ogl wd OPENGL wdmove _1 0 ogl=: ''conew'jzopengl' wd'setfocus g' wd'pcenter;pshow;' init'' initTurtles y yw 0 NB. this is a startup command for my app ) opengl_close=: 3 : 0 smoutput 'opengl_close' target__ogl'' gluDeleteQuadric QUADS destroy__ogl'' ogl=: '' wd 'pclose' ) After loading tgsjbasic2.ijs I have been using the following commands to exercise the code. tgsj_run 3 pu '' bk 380 factor =: -: ifactor =: factor^:_1 start =: factor 8 12 8 0 slow =: factor 8 6 8 0 catchup =: factor 10 8 8 0 yaw =: factor _2 0 0 0 (ifactor 2) repeats fd start (ifactor 10) repeats fd slow (ifactor 30) repeats fd catchup catchup (ifactor 10) repeats fdyw yaw (ifactor 10) repeats fd catchup catchup (ifactor 10) repeats fdyw -yaw (ifactor 10) repeats fd catchup Then after executing the above I close the graphics window and in the ijx window I type stuff like the following. tgsj_run 3 rt 30 fd 20 Thanks, again, On Sat, Nov 10, 2012 at 5:46 PM, bill lam <[email protected]> wrote: >> When I just click on the close button on the graphics window, the >> smoutput' opengl_close' never shows. > > This is strange, did you remove the closeok flag as what I > suggested? You may email me your program so that I can test, but > only on linux. > > -- > 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 -- (B=) <-----my sig Brian Schott ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
