Sherlock, Ric wrote:
> Thanks for the suggested work around.

I don't think of it as a work around. If you are displaying a new table,
it makes sense to create a new grid. Using an old grid for the purpose
is inviting trouble, unless the new table happens to be compatible with
the old.

In any case, I suggest you take this route for the time being.

> In case it helps work out if it's my code that's causing the problem,
> I've copied my code that interacts with the Grid below.
> 
> The array I'm giving viewTable is the output of a SQLite query, so the
> top row is the column names from the database and the rest is rows of
> data.
> 
> Are there other globals that I should be updating?

Very likely, since many globals depend on table size.

But this does point to a missing feature - the grid should check table
size and type, and on any change, attempt to fix up all related globals
or signal an error if not possible. Currently, there is no such check.
Your example is a good start, thanks.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to