Raul Miller wrote:
My thought is that I could create a .ijs file for a chapter or section,
and while it could be executed manually a line at a time that I also
wanted to be able to hit control-shift-w to review the script.
While viewmat lends itself rather well to this approach (it spawns a
new window every time it runs). For someone familiar with viewmat,
plot seems to destroy the previous window every time it's run.
Closer inspection shows that plot actually reuses the previous
window. However:
The default behaviour for viewmat and plot is clearly different but both are
defined as classes and can be used to open as many windows as wanted (see
plot_class.htm). It is easy to name the windows to distinguish them if
wanted.
The viewmat default is fine for the situation where beginning users want to
use a colour display of some function. However I cannot see any advantage
in changing the default plot class behaviour. In experimenting with a plot
using a script and ctrl-r you could easily end up with a whole series of
windows to close. For me at least, a graphic goes through multiple
refinement steps and I do not want to have the whole sequence as separate
windows.
If someone runs open'jzplot' then accidentally types something
and uses control-Z to undo that typing, they lose the contents of
the window. This is one keystroke away from losing a significant
chunk of J -- this seems too easy and of no particular benefit.
Perhaps J should have a way of discarding undo history.
This seems to be slightly overdoing the risk. Someone who is opening the
class scripts to modify them should have enough knowledge to know that if
you click on close, then answer Yes to the question if you want the script
modified something will be changed in the system.
Most users will not want to change these scripts, and if they do should
create a copy with a different name while doing so and testing.
Fraser
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm