The following modification to the viewmat code will allow the viewer and saver "savemat" to be called in code without reverting to immediate execution. This suggestion is thanks to Dave Mitchell (on the J-Programming Forum):
from David Mitchell <davidmitchell@att.net>
to Programming forum <programming@jsoftware.com>
date Tue, Dec 16, 2008 at 9:12 AM
subject Re: [Jprogramming] savemat_jviewmat_
Perhaps this is too simple or has side effects I haven't encountered, but it seems to work for me
open'viewmat'
change
NB. =========================================================
vmrun=: 4 : 0
...
wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh
wd 'pshow'
to
NB. =========================================================
vmrun=: 4 : 0
...
wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh
jvm_show '' NB. DM 2008 12 16
wd 'pshow'
Save and load viewmat.ijs .
Run test_viewmat'' . On Vista 32, for me, Viewmat now displays correctly and saves a good BMP.
--
Regards,
David MitchellWhere "test_viewmat" could be something like the following:
test_viewmat=: 3 : 0 viewmat 1 o. +/~i:3j99 savemat_jviewmat_ 'sin1.bmp' closeall_jviewmat_ '' viewmat 2 o. -/~i:6j99 savemat_jviewmat_ 'cos1.bmp' closeall_jviewmat_ '' viewmat (([:|.1 o.])+2 o.])+/~i:3j99 savemat_jviewmat_ 'sinCos1.bmp' closeall_jviewmat_ '' )
Both pieces of code downloadable here.
The original "test_viewmat" can also be found in this long e-mail thread about this problem.
