[fxruby-users] Re: FXTable -- numColumns & resize

Lyle Johnson lyle.johnson at gmail.com
Sat Oct 23 11:43:37 EDT 2004

On Fri, 22 Oct 2004 13:39:06 -0700, Bob Sidebotham <bob at windsong.bc.ca> wrote:

> In 1.2 FXTable, numColumns is documented as numCols, but should be
> numColumns, I think. Also the examples/table.rb app uses numCols, and
> should use numColumns.

Yes, you're right. I've added both of these bugs to the FXRuby bug
list, found here:


> Also, resizing a table always seems to clear all cells. Is this the
> expected behavior?

Yes, that is the expected behavior; I'll add a note to the API
documentation to make this more clear.

> If I'm filling in from a database, for example, is it
> reasonable to assume that I should be able to resize by 1 row for each
> row from the database, w/o losing data (so I don't have to know ahead of
> time how many rows will be filled in)?

For that situation I think I'd recommend the FXTable#insertRows method
(which is not destructuve like setTableSize is). To append a row to
the end of the table, pass the current number of rows as the
"starting" row number:

    aTable.insertRows(aTable.numRows, 1)

> P.S. Should questions like this be sent to the list (fxruby-users), do
> you want them sent to you, or do you not care one way or the other?

I'd recommend sending them to the list, if only for the reason that
someone else might answer your question(s) before I can get to them.
Also, of course, someone else might have the same questions and
benefit from seeing the answers.

More information about the fxruby-users mailing list