Bill,

Thanks very much for your test code.
I ran it with the suggestions you made.
After canceling the graphic window, another graphic window appears
with the image unchanged, or maybe the original graphic window just
goes to the back of the windows.

I have experimented some more with that graphic window "appearing". It
seems as if it only appears if, before I click on its close button, I
click on other windows first and then click on its close button. If I
do that then it reappears as sort of dead window. It is dead in the
sense that when I click Cmd+` to cycle between windows, no cycling
occurs. However, a second click on its close button does close it.

In any case, when I execute the following command, I get the indicated
alert message and cannot proceed.

   tgsj_run 3
|assertion failure: tgsj_run
|   0=#ogl


Would you please look again at your suggested definition of
opengl_close? I think you left out `3 :` on the first line and I don't
understand your wd line after `::`. FYI my original definition is as
follows.

opengl_close=: 3 : 0
gluDeleteQuadric QUADS
destroy__ogl''
ogl=: ''
wd 'pclose'
)


On Fri, Nov 9, 2012 at 6:42 PM, bill lam <[email protected]> wrote:
> I guess you may try
>
> ogl =: ''
>
> tgsj_run=: 3 : 0
> 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;'
> yw 0  NB. this is a startup command for my app
> )
>
> opengl_close=: 0
> free__ogl''      NB. force new rc
> wd ::0:'pclose'
> )
>
> OPENGL=: 0 : 0
> pc opengl;pn tgsj;
> xywh 0 0 200 150;cc g isigraph opengl rightmove bottommove;
> pas 0 0;
> rem form end;
> )
>
> (untested)
>
> Птн, 09 Ноя 2012, Brian Schott писал(а):
>>
>> I have the following J602 code which initializes a window for opengl
>> just fine, but only the first time in a J session. After the first
>> time if I execute `tgsj_run ''` with the original graphics window
>> still open (it is closed before the first execution of `tgsj_run ''`)
>> I get a new grpahics window. Also upon the second execution of
>> `tgsj_run ''` the .ijs window disappears.
>>
>> On the other hand if I close the graphics window with escape before
>> re-executing `tgsj_run ''`, I get varied results. Sometimes it works
>> fine, but most often I either get a system crash or the old window
>> reopens along with the new window when I re-execute `tgsj_run ''`.
>>
>> Any ideas?
>>
>>    9!:12''
>> 5
>>    9!:14''
>> j602/2008-03-03/16:45
>>
>>
>>
>> ogl =: ''
>>
>> tgsj_run=: 3 : 0
>> try.
>>   opengl_close ''
>>   free__ogl''      NB. force new rc
>> catch.
>> end.
>> wd OPENGL
>> wdmove _1 0
>> if. 0=#ogl do.
>>   ogl=: ''conew'jzopengl'
>>   wd'setfocus g'
>> end.
>> wd'pcenter;pshow;'
>> yw 0  NB. this is a startup command for my app
>> )
>>
>> OPENGL=: 0 : 0
>> pc opengl closeok;pn tgsj;
>> xywh 0 0 200 150;cc g isigraph opengl rightmove bottommove;
>> pas 0 0;
>> rem form end;
>> )
>>
>>
>> (B=)
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> 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

Reply via email to