Quantcast

Qooxdoo 1.0.1 - possible bug in table.Table behavior

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Qooxdoo 1.0.1 - possible bug in table.Table behavior

Ken MacDonald
I have been migrating from 0.8.3 to 1.0.1. Most things went OK, although I had a brief run-in with some artifacts I referred to as "luminous squids". Amusing for a bit, but they're gone now :-)

In 0.8.3 the following table appeared as desired, having a simple line border around the table, no column labels, and no horizontal scroll bar. After conversion, the table now displays a block for the column label, and the horizontal scroll bar, even though none of the elements is anywhere near the table width. The following code used to hack around a problem with setting the HeaderCellHeight, and also gets rid of the horizontal scrollbar (or used to), but appears to have broken in 1.0.1.

Does anyone see any obvious problems? I'm not getting any deprecation warnings in the app, but need to get the 0.8.3 behavior back if we're going to be able to migrate to 1.0.x.
Thanks,
Ken

      var dm = new qx.ui.table.model.Simple();
      dm.setColumns([""]);
      dm.setEditable(false);
      dm.setColumnSortable(0, false);
      this.menuItemTable = new qx.ui.table.Table(dm);
      this.menuItemTable.getContainerElement().setAttribute("id",
                                                            "top_recipe_list");
      this.menuItemTable.set({ height: 260,
                               minHeight: 100,
                               width: 278,
                               columnVisibilityButtonVisible: false,
                               statusBarVisible: false,
                               showCellFocusIndicator: false,
                               tabIndex: 5
                            });
      this.menuItemTable.setColumnWidth(0,284);
      this.menuItemTable.getSelectionModel().addListener("changeSelection",
                                  this.menuItemTableChangeSelection, this);

      this.menuItemTable.addListener("cellDblclick", this.menuItemTableDblClick, this);

      // make it look like a list box.
      // this should hide the header, but it doesn't.
      // this.menuItemTable.set({headerCellHeight: 0});
      // this doesn't work, too (in qooxdoo 1.0.1)
      // this.menuItemTable.setHeaderCellHeight(1);
      // so the following hacks around that. Also hides the horizontal
      // scrollbar.
      var scrollerArr = this.menuItemTable._getPaneScrollerArr();
      for (var idx = 0, ln = scrollerArr.length; idx < ln; idx++) {
          header = scrollerArr[idx].getHeader();
          clipper = header.getLayoutParent();
          clipper.setHeight(0);

          hscroll = scrollerArr[idx].getChildControl("scrollbar-x");
          hscroll.setHeight(0);
      }


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qooxdoo 1.0.1 - possible bug in table.Table behavior

Thomas Herchenroeder
Did you run 'generate.py migration'? Did you go through the messages of
the migration.log?

T.

> I have been migrating from 0.8.3 to 1.0.1. Most things went OK, although I
> had a brief run-in with some artifacts I referred to as "luminous squids".
> Amusing for a bit, but they're gone now :-)
>
> In 0.8.3 the following table appeared as desired, having a simple line
> border around the table, no column labels, and no horizontal scroll bar.
> After conversion, the table now displays a block for the column label, and
> the horizontal scroll bar, even though none of the elements is anywhere
> near
> the table width. The following code used to hack around a problem with
> setting the HeaderCellHeight, and also gets rid of the horizontal
> scrollbar
> (or used to), but appears to have broken in 1.0.1.
>
> Does anyone see any obvious problems? I'm not getting any deprecation
> warnings in the app, but need to get the 0.8.3 behavior back if we're
> going
> to be able to migrate to 1.0.x.
> Thanks,
> Ken
>
>       var dm = new qx.ui.table.model.Simple();
>       dm.setColumns([""]);
>       dm.setEditable(false);
>       dm.setColumnSortable(0, false);
>       this.menuItemTable = new qx.ui.table.Table(dm);
>       this.menuItemTable.getContainerElement().setAttribute("id",
>
> "top_recipe_list");
>       this.menuItemTable.set({ height: 260,
>                                minHeight: 100,
>                                width: 278,
>                                columnVisibilityButtonVisible: false,
>                                statusBarVisible: false,
>                                showCellFocusIndicator: false,
>                                tabIndex: 5
>                             });
>       this.menuItemTable.setColumnWidth(0,284);
>       this.menuItemTable.getSelectionModel().addListener("changeSelection",
>                                   this.menuItemTableChangeSelection,
> this);
>
>       this.menuItemTable.addListener("cellDblclick",
> this.menuItemTableDblClick, this);
>
>       // make it look like a list box.
>       // this should hide the header, but it doesn't.
>       // this.menuItemTable.set({headerCellHeight: 0});
>       // this doesn't work, too (in qooxdoo 1.0.1)
>       // this.menuItemTable.setHeaderCellHeight(1);
>       // so the following hacks around that. Also hides the horizontal
>       // scrollbar.
>       var scrollerArr = this.menuItemTable._getPaneScrollerArr();
>       for (var idx = 0, ln = scrollerArr.length; idx < ln; idx++) {
>           header = scrollerArr[idx].getHeader();
>           clipper = header.getLayoutParent();
>           clipper.setHeight(0);
>
>           hscroll = scrollerArr[idx].getChildControl("scrollbar-x");
>           hscroll.setHeight(0);
>       }
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com_______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qooxdoo 1.0.1 - possible bug in table.Table behavior

Ken MacDonald
Yes, ran migration; there were no messages besides "processed file"-type messages.
Ken

On Thu, Jan 28, 2010 at 2:55 PM, thron7 <[hidden email]> wrote:
Did you run 'generate.py migration'? Did you go through the messages of
the migration.log?

T.

> I have been migrating from 0.8.3 to 1.0.1. Most things went OK, although I
> had a brief run-in with some artifacts I referred to as "luminous squids".
> Amusing for a bit, but they're gone now :-)
>
> In 0.8.3 the following table appeared as desired, having a simple line
> border around the table, no column labels, and no horizontal scroll bar.
> After conversion, the table now displays a block for the column label, and
> the horizontal scroll bar, even though none of the elements is anywhere
> near
> the table width. The following code used to hack around a problem with
> setting the HeaderCellHeight, and also gets rid of the horizontal
> scrollbar
> (or used to), but appears to have broken in 1.0.1.
>
> Does anyone see any obvious problems? I'm not getting any deprecation
> warnings in the app, but need to get the 0.8.3 behavior back if we're
> going
> to be able to migrate to 1.0.x.
> Thanks,
> Ken
>
>       var dm = new qx.ui.table.model.Simple();
>       dm.setColumns([""]);
>       dm.setEditable(false);
>       dm.setColumnSortable(0, false);
>       this.menuItemTable = new qx.ui.table.Table(dm);
>       this.menuItemTable.getContainerElement().setAttribute("id",
>
> "top_recipe_list");
>       this.menuItemTable.set({ height: 260,
>                                minHeight: 100,
>                                width: 278,
>                                columnVisibilityButtonVisible: false,
>                                statusBarVisible: false,
>                                showCellFocusIndicator: false,
>                                tabIndex: 5
>                             });
>       this.menuItemTable.setColumnWidth(0,284);
>       this.menuItemTable.getSelectionModel().addListener("changeSelection",
>                                   this.menuItemTableChangeSelection,
> this);
>
>       this.menuItemTable.addListener("cellDblclick",
> this.menuItemTableDblClick, this);
>
>       // make it look like a list box.
>       // this should hide the header, but it doesn't.
>       // this.menuItemTable.set({headerCellHeight: 0});
>       // this doesn't work, too (in qooxdoo 1.0.1)
>       // this.menuItemTable.setHeaderCellHeight(1);
>       // so the following hacks around that. Also hides the horizontal
>       // scrollbar.
>       var scrollerArr = this.menuItemTable._getPaneScrollerArr();
>       for (var idx = 0, ln = scrollerArr.length; idx < ln; idx++) {
>           header = scrollerArr[idx].getHeader();
>           clipper = header.getLayoutParent();
>           clipper.setHeight(0);
>
>           hscroll = scrollerArr[idx].getChildControl("scrollbar-x");
>           hscroll.setHeight(0);
>       }
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com_______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qooxdoo 1.0.1 - possible bug in table.Table behavior

Thomas Herchenroeder
Here is a version of your code that actually runs in the Playground. Might
help people to work on your problem.

T.

var   dm = new qx.ui.table.model.Simple();
      dm.setColumns([""]);
      dm.setEditable(false);
      dm.setColumnSortable(0, false);
      this.menuItemTable = new qx.ui.table.Table(dm);
      this.menuItemTable.getContainerElement().setAttribute("id","top_recipe_list");
      this.menuItemTable.set({ height: 260,
                               minHeight: 100,
                               width: 278,
                               columnVisibilityButtonVisible: false,
                               statusBarVisible: false,
                               showCellFocusIndicator: false,
                               tabIndex: 5
                            });
      this.menuItemTable.setColumnWidth(0,284);
      this.menuItemTable.getSelectionModel().addListener("changeSelection",
                                                         function(){}, this);

      this.menuItemTable.addListener("cellDblclick",
                                     function(){}, this);


      // make it look like a list box.
      // this should hide the header, but it doesn't.
      // this.menuItemTable.set({headerCellHeight: 0});
      // this doesn't work, too (in qooxdoo 1.0.1)
      // this.menuItemTable.setHeaderCellHeight(1);
      // so the following hacks around that. Also hides the horizontal
      // scrollbar.
      var scrollerArr = this.menuItemTable._getPaneScrollerArr();
      for (var idx = 0, ln = scrollerArr.length; idx < ln; idx++) {
          header = scrollerArr[idx].getHeader();
          clipper = header.getLayoutParent();
          clipper.setHeight(0);

          hscroll = scrollerArr[idx].getChildControl("scrollbar-x");
          hscroll.setHeight(0);
      }
this.getRoot().add(this.menuItemTable);



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qooxdoo 1.0.1 - possible bug in table.Table behavior

Fabian Jakobs
Administrator
In reply to this post by Ken MacDonald
Hi Ken,

> I have been migrating from 0.8.3 to 1.0.1. Most things went OK,
> although I had a brief run-in with some artifacts I referred to as
> "luminous squids". Amusing for a bit, but they're gone now :-)
>
> In 0.8.3 the following table appeared as desired, having a simple line
> border around the table, no column labels, and no horizontal scroll
> bar. After conversion, the table now displays a block for the column
> label, and the horizontal scroll bar, even though none of the elements
> is anywhere near the table width. The following code used to hack
> around a problem with setting the HeaderCellHeight, and also gets rid
> of the horizontal scrollbar (or used to), but appears to have broken
> in 1.0.1.
I can confirm your issue. The code Thomas has posted works as expected
in the 0.8.3 demo browser but shows the described artefacts in the 1.0.1
one.

The reason your code doesn't work is that you set the "height" property.
This property defines the "preferred" height of a widget. However the
layout manager of the parent widget might decide to ignore the preferred
size and stretch/shrink the widget. e.g. a widget inside a vertical box
layout is by default stretched horizontally to the width of the parent.

Setting minHeight and maxHeight tells the layout manager to never exceed
these values. I could fix your issue by replacing

xxx.setHeight(0);

with

xxx.setMinHeight(0);
xxx.setMaxHeight(0);

I don't know exactly, which change caused the problem but the fix is
easy and would have been the right solution in the first place. You've
just been lucky that it worked in 0.8.3 :-)

Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qooxdoo 1.0.1 - possible bug in table.Table behavior

Ken MacDonald
Hi T., Fabian,
Thanks for getting this into the demo browser and figuring out what was going on. Appears to work fine now w/Fabian's changes. Migration from 0.8.3 -> 1.0.1 seems to be overall rather easier than the 0.7.x -> 0.8.3 was; this is the only real problem I've found so far; although there were some similar artifacts that went away after I fixed some deprecation warnings. In one case the change had no apparent relation to the artifacts (warning referenced a different widget) so if you're one of the few who haven't migrated to 1.0.1 yet, I'd suggest cleaning up any deprecations as your first order of business if you are seeing things break.
Ken

The reason your code doesn't work is that you set the "height" property.
This property defines the "preferred" height of a widget. However the
layout manager of the parent widget might decide to ignore the preferred
size and stretch/shrink the widget. e.g. a widget inside a vertical box
layout is by default stretched horizontally to the width of the parent.

Setting minHeight and maxHeight tells the layout manager to never exceed
these values. I could fix your issue by replacing

xxx.setHeight(0);

with

xxx.setMinHeight(0);
xxx.setMaxHeight(0);


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...