I wrote about trying to get grids working a week or so ago. Since then, I was able to reverse-engineer a Jwiki example to work in a pop- up form.
But that was a toy application and I need to have grids in forms that are called by other forms as part of a more serious application. Due to limited ability and imagination, I'd prefer to keep most of the app in the base locale and manage all events under program control. Another matter: The samples in the wiki have bits of code floating in the scripts (for example, CELLDATA, HDRROW and HDRCOL assignments) and I'm not sure how these would work where several forms and grids (perhaps two per form in some cases) need to exist and strong program control is necessary. Anyhow, for now assume the following: Data are selected, read into the system and formatted into a matrix called DATAMAT (global variable), all in the "base" locale. A button on a form is clicked, evoking a handler that might be called MainForm_continue_button. That handler ideally should contain code that calls , say, NewForm=: 0 : 0 that creates a form with all the gadgets including TWO isigraphs that I'll call grid0 and grid1. Let's stipulate that the data in DATAMAT are to appear in grid0. The following code fragment crashes on the "show" statement. NB. - - - - - - - - wd NewForm grid0=: '' conew 'jzgrid' CELLDATA=: DATAMAT_base_ show__grid0 'celldata' wd 'pshow' NB. - - - - - - - - After the crash, a << coname '' >> query returns a boxed sequence number. Is this okay, or is an explicit << cocurrent 'whatever' >> assignment required and, if so, what might it look like and where should it be placed in the controlling program? Also missing is anything to do with the "create" command. Is some sort of "create" statement required? Assuming "create" is essential, where should it be placed and what might the command look like in the context shown above? And, in the context of the code above, can I assume a << cocurrent 'base' >> command is required following the "pshow", or should that switch be made before the << wd 'pshow' >> statement? Or is it essential that the pop-up form itself be in its own locale and that floating-in-the-script commands are the only way to go as in the wiki examples? Bjorn Helgason says he has code examples in a Google user chat group. If one of those examples covers the general situation sketched above, I'll sign on to the group and take a look; otherwise, I don't like to sign into much on the Web unless the need is vital. Actual code I've developed is now too extensive to include in an email, so I'm hoping the description above will be good enough as a basis for any help. Thanks, Donald Pittenger ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
