I've similar problem and spent a lot of hours, before I discovered:
table columns/rows had invalid widths/heights -- zero or even large
negative. After I had added programmatically setup for them with
TblSetColumnWidth and TblSetRowHeight all worked fine. I don't have
CodeWarrior but it seems to me, that this behavior is prc-tools chain
only feature. Let's ask Aaron to test it -- may PILRC produce
inconsistent table resource? COLUMNWIDTHS description did not set any
widths and no sample I've found calls TblSetColumnWidth or
TblSetRowHeight (and does not work too).
Gerben Blom wrote:
>
> I try to create a table with three columns; a date, an integer and a text
> column.
> Somehow I seem to miss something because all I get is an empty form.
> I use PalmOS 3.5 with GCC and pilrc 2.7a.
> What is wrong here? I suppose it must be something simple......
>
> The table initialization code:
>
> ===== snip =====
>
> rowsInTable = TblGetNumberOfRows(table);
>
> for (row = 0; row < rowsInTable; row++) {
> TblSetItemStyle(table, row, 0, dateTableItem);
> TblSetItemInt(table, row, 0, DateToInt(dates[i]));
>
> TblSetItemStyle(table, row, 1, numericTableItem);
> TblSetItemInt(table, row, 1, row);
>
> TblSetItemStyle(table, row, 2, textTableItem);
> TblSetItemPtr(table, row, 2, labels[i]);
> }
>
> for (i = 0; i < 3; i++)
> TblSetColumnUsable(table, i, true);
>
> ==== end snip =====
>
> This code is called on the openEvent of the form:
>
> ===== snip ======
>
> case frmOpenEvent:
> form = FrmGetActiveForm();
> InitTheTable(form);
> FrmDrawForm(form);
> handled = 1;
> break;
>
> ====== snip =======
--
Alexander Horoshilov
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/