Philip A. Viton wrote:
OK, I'm making slow progress. Thanks to David Mitchell I understand that
the reason that I couldn't find CELLDATA was that I'd closed the grid,
which destroyed the locales.
As I understand it, each invocation of grid creates two locales, the
second of which (ie the one with the higher locale number, pointed to
by syslocalec) contains the updated CELLDATA (Is this correct?).
Then what I need to do is handle the grid closing, such that instead of
just destroying the locales it first makes a copy of CELLDATA somewhere
I can use
it. I think can do this by providing my own gridp_close, which gets the
data, saves it, and then calls gridpdestroy. My question is, is there an
alternative to putting my own gridp_close in jzgrid.ijs, ie over-writing
the default definition of this (which just sets gridp_close equal to
gridpdestroy) ? As far as I can tell, I can't put it into z since the
numbered locales search jzgrid before z.
I have a feeling I'm just not understanding how the grid verb (or locales)
work - can anyone help?
------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
[EMAIL PROTECTED]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
I think you are on the right track. I suggest that you review the lab on Object
Oriented Programming. I believe what you need to do is extend the class
'jzgrid' with your definition for 'gridpdestroy' to capture the CELLDATA.
jzgrid is a class and is most easily dealt with using the OOP tools. That way,
you don't have to worry about the locales. The OOP framework will do all of
that for you.
BTW, I also recommend the lab on Locales. In particular, 'copath' will display
how names are selected from locales.
--
David Mitchell
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm