On Wed, Nov 12, 2008 at 12:08 PM, Petr Kobalíček
<[EMAIL PROTECTED]>wrote:
> Hi guys,
>
> I have one wish:-)
>
> I'm very often doing this:
>
> table.setColumnWidth(0, 40);
> table.setColumnWidth(1, 80);
> table.setColumnWidth(2, 80);
> table.setColumnWidth(3, 180);
> table.setColumnWidth(4, 50);
> table.setColumnWidth(5, 60);
> table.setColumnWidth(6, 60);
> table.setColumnWidth(7, 60);
> table.setColumnWidth(8, 40);
> table.setColumnWidth(9, 40);
> table.setColumnWidth(10, 30);
> table.setColumnWidth(11, 40);
> table.setColumnWidth(12, 60);
>
> Shouldn't be added method to the table setColumnWidths() ?
>
> table.setColumnWidths([10, 20, 30, 40, 50, ...]);
>
> It's only about syntax:)
Syntax is easy to correct on one's own. :-)
for (var i=0, widths = [ 40, 80, 80, 180, 50, 60, 60, 60, 40, 40, 30, 40, 60
]; i < widths.length; i++)
table.setColumnWidth(i, widths[i]);
or maybe if you want it a bit less reaadable:
(function()
{
for (var i = 0; i < arguments.length; i++)
table.setColumnWidth(i, arguments[i]);
})(40, 80, 80, 180, 50, 60, 60, 60, 40, 40, 30, 40, 60);
Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel