Eric and others,
Wait. News flash.
When I remove the line ( wd'psel opengl;pactive') from the paint verb,
I no longer get the problem of keystrokes being ignored in the
graphics window. I am not sure this cures all my problems, but let me
get back to you when I can test the system more.
By the way, what the line ( wd'psel opengl;pactive') seems to do is to
switch focus automatically from the ijx window to the graphics window
after a text command is entered in the ijx window. I suppose that it
may be better to leave out that line and expect the user to manually
look for and at the graphics window after typing in the ijx window.
Thanks to all,
*********interesting, but unnecessary, info is below********
My sample script is taken from the opengl "cups" demo at
~system/examples/graphics/opengl/demo/cups.ijs
You can recreate my script by running the opengl demo and selecting
Surface|Cups from the menus. Then from the Options menu select View
Standalone Script and copy and paste that script into an .ijs window
to be run from there (with Control+W or by clicking in Run|Window?)
But before you run the script you will need to add the following lines
into the script.
".COLORTABLE
gsetdefaults''
GS_CLEARCOLOR=: IVORY
pickone =: COLORTABLE&(13 : '".>{.;:y{x')
try =: monad define
for. i. y do.
g...@pickone@? 144
end.
)
go =: monad define
GS_CLEARCOLOR=: y
paint''
)
One other change I made was to add the following line to the beginning
of the paint verb because I was trying to achieve the finding of the
graphics handle when jumping between windows.
wd'psel opengl;pactive'
--
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm