PageRenderTime 46ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/pyjs/tests/test029.js

http://pyjamas.googlecode.com/
JavaScript | 26 lines | 21 code | 5 blank | 0 comment | 3 complexity | 985f4ca3a0affe0c906825fce4a23819 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. __DynaTableWidget.prototype.__class__ = "DynaTableWidget";
  2. function DynaTableWidget() {
  3. return new __DynaTableWidget();
  4. }
  5. function __DynaTableWidget() {
  6. }
  7. __DynaTableWidget.prototype.initTable = function(columns, columnStyles, rowCount) {
  8. this.grid.resize( ( rowCount + 1 ) , pyjslib_len(columns));
  9. var __i = pyjslib_range(pyjslib_len(columns)).__iter__();
  10. try {
  11. while (true) {
  12. var i = __i.next();
  13. var caption = columns.__getitem__(i);
  14. this.grid.setText(0, i, columns.__getitem__(i));
  15. }
  16. } catch (e) {
  17. if (e != StopIteration) {
  18. throw e;
  19. }
  20. }
  21. };