canvas in a table cell

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

canvas in a table cell

oetiker
Folks,

I would like to place a canvas element into a table cell. Putting
the <canvas></canvas> html there is simple, but since I need access
to the DOM element to paint on the canvas and in the cellrenderer
I am only dealing with a html string I am a bit lost as to the best
aproach for this ...

is there some event which I could listen for as to when the cells
html is put into the DOM ?

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

MartinWittemann
Administrator
Hello Tobi,

I just tried reproduce your problem but I guess there is no event exactly dedicated to such a scenario. I tried the paneReloadsData of the table pane and it worked more or less. Take a look at the modified table playground example to see how you could do it.

function createRandomRows(rowCount) {
  var rowData = [];
  var nextId = 0;
  for (var row = 0; row < rowCount; row++) {
    rowData.push([ nextId++, "abc" ]);
  }
  return rowData;
}

// window
var win = new qx.ui.window.Window("Table").set({
  layout : new qx.ui.layout.Grow(),
  contentPadding: 0
});
this.getRoot().add(win);
win.open();

// table model
var tableModel = new qx.ui.table.model.Simple();
tableModel.setColumns([ "ID", "HTML" ]);
tableModel.setData(createRandomRows(10));

// table
var table = new qx.ui.table.Table(tableModel).set({
  decorator: null
})
win.add(table);

// table column model
var tcm = table.getTableColumnModel();
tcm.setDataCellRenderer(1, new qx.ui.table.cellrenderer.Html());

var scroller = table.getPaneScroller(0);
var pane = scroller.getTablePane();
pane.addListener("paneReloadsData", function() {
  console.log(document.getElementById("xx1"));
}, this);

Anyway, I will talk to Fabian, who is our Table maintainer. Perhaps he has a more elegant solution to this.
Best,
Martin

oetiker wrote
Folks,

I would like to place a canvas element into a table cell. Putting
the <canvas></canvas> html there is simple, but since I need access
to the DOM element to paint on the canvas and in the cellrenderer
I am only dealing with a html string I am a bit lost as to the best
aproach for this ...

is there some event which I could listen for as to when the cells
html is put into the DOM ?

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi@oetiker.ch ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

oetiker
Hi Martin,

I was meditating on this problem tonight, and I see two scenarios:

a) create a cellrenderer.Canvas which adds a canvas tag with a
   running id into the table and adds the values with the id into a
   queue.

        _getContentHtml : function(cellInfo) {
            var id = this.__id+cellInfo.row+'x'+cellInfo.col;
            this.__queue.push([id,cellInfo.value]);
            return "<canvas id='"+id+"'></canvas>";
        },

   using the  paneReloadsData I would then call the new 'update'
   method on the cellrenderer object, causing it to render all the
   canvas elements in the __queue, much like you suggested below.

on the other hand,

b) my use case is such that I am updateing the table every few
   seconds with new data coming from the server. Since I am
   replacing the entire table content on every update I wonder if
   this is the most efficient thing todo, especially since the table
   is only 10 - 100 lines long. I can see the browser using an
   increassing amount of memory as the table is being updated ...

if the table aproach does not work I will try the grid layout
instead. This would would also solve the canvas issue since the
grid can contain normal widgets ...

cheers
tobi

Yesterday MartinWittemann wrote:

>
> Hello Tobi,
>
> I just tried reproduce your problem but I guess there is no event exactly
> dedicated to such a scenario. I tried the paneReloadsData of the table pane
> and it worked more or less. Take a look at the modified table playground
> example to see how you could do it.
>
> function createRandomRows(rowCount) {
>   var rowData = [];
>   var nextId = 0;
>   for (var row = 0; row < rowCount; row++) {
>     rowData.push([ nextId++, " abc " ]);
>   }
>   return rowData;
> }
>
> // window
> var win = new qx.ui.window.Window("Table").set({
>   layout : new qx.ui.layout.Grow(),
>   contentPadding: 0
> });
> this.getRoot().add(win);
> win.open();
>
> // table model
> var tableModel = new qx.ui.table.model.Simple();
> tableModel.setColumns([ "ID", "HTML" ]);
> tableModel.setData(createRandomRows(10));
>
> // table
> var table = new qx.ui.table.Table(tableModel).set({
>   decorator: null
> })
> win.add(table);
>
> // table column model
> var tcm = table.getTableColumnModel();
> tcm.setDataCellRenderer(1, new qx.ui.table.cellrenderer.Html());
>
> var scroller = table.getPaneScroller(0);
> var pane = scroller.getTablePane();
> pane.addListener("paneReloadsData", function() {
>   console.log(document.getElementById("xx1"));
> }, this);
>
> Anyway, I will talk to Fabian, who is our Table maintainer. Perhaps he has a
> more elegant solution to this.
> Best,
> Martin
>
>
> oetiker wrote:
> >
> > Folks,
> >
> > I would like to place a canvas element into a table cell. Putting
> > the <canvas></canvas> html there is simple, but since I need access
> > to the DOM element to paint on the canvas and in the cellrenderer
> > I am only dealing with a html string I am a bit lost as to the best
> > aproach for this ...
> >
> > is there some event which I could listen for as to when the cells
> > html is put into the DOM ?
> >
> > cheers
> > tobi
> >
> >
> > --
> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> > http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

MartinWittemann
Administrator
Hi tobi,
I don't know exactly your use case but if you can use the grid instead, do so.
No matter what way you will go, i'm sure everyone is interested in the outcome. ;)
Best,
Martin


oetiker wrote
Hi Martin,

I was meditating on this problem tonight, and I see two scenarios:

a) create a cellrenderer.Canvas which adds a canvas tag with a
   running id into the table and adds the values with the id into a
   queue.

        _getContentHtml : function(cellInfo) {
            var id = this.__id+cellInfo.row+'x'+cellInfo.col;
            this.__queue.push([id,cellInfo.value]);
            return "<canvas id='"+id+"'></canvas>";
        },

   using the  paneReloadsData I would then call the new 'update'
   method on the cellrenderer object, causing it to render all the
   canvas elements in the __queue, much like you suggested below.

on the other hand,

b) my use case is such that I am updateing the table every few
   seconds with new data coming from the server. Since I am
   replacing the entire table content on every update I wonder if
   this is the most efficient thing todo, especially since the table
   is only 10 - 100 lines long. I can see the browser using an
   increassing amount of memory as the table is being updated ...

if the table aproach does not work I will try the grid layout
instead. This would would also solve the canvas issue since the
grid can contain normal widgets ...

cheers
tobi

Yesterday MartinWittemann wrote:

>
> Hello Tobi,
>
> I just tried reproduce your problem but I guess there is no event exactly
> dedicated to such a scenario. I tried the paneReloadsData of the table pane
> and it worked more or less. Take a look at the modified table playground
> example to see how you could do it.
>
> function createRandomRows(rowCount) {
>   var rowData = [];
>   var nextId = 0;
>   for (var row = 0; row < rowCount; row++) {
>     rowData.push([ nextId++, " abc " ]);
>   }
>   return rowData;
> }
>
> // window
> var win = new qx.ui.window.Window("Table").set({
>   layout : new qx.ui.layout.Grow(),
>   contentPadding: 0
> });
> this.getRoot().add(win);
> win.open();
>
> // table model
> var tableModel = new qx.ui.table.model.Simple();
> tableModel.setColumns([ "ID", "HTML" ]);
> tableModel.setData(createRandomRows(10));
>
> // table
> var table = new qx.ui.table.Table(tableModel).set({
>   decorator: null
> })
> win.add(table);
>
> // table column model
> var tcm = table.getTableColumnModel();
> tcm.setDataCellRenderer(1, new qx.ui.table.cellrenderer.Html());
>
> var scroller = table.getPaneScroller(0);
> var pane = scroller.getTablePane();
> pane.addListener("paneReloadsData", function() {
>   console.log(document.getElementById("xx1"));
> }, this);
>
> Anyway, I will talk to Fabian, who is our Table maintainer. Perhaps he has a
> more elegant solution to this.
> Best,
> Martin
>
>
> oetiker wrote:
> >
> > Folks,
> >
> > I would like to place a canvas element into a table cell. Putting
> > the <canvas></canvas> html there is simple, but since I need access
> > to the DOM element to paint on the canvas and in the cellrenderer
> > I am only dealing with a html string I am a bit lost as to the best
> > aproach for this ...
> >
> > is there some event which I could listen for as to when the cells
> > html is put into the DOM ?
> >
> > cheers
> > tobi
> >
> >
> > --
> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> > http://it.oetiker.ch tobi@oetiker.ch ++41 62 775 9902 / sb: -9900
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > qooxdoo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi@oetiker.ch ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

oetiker
Today MartinWittemann wrote:

>
> Hi tobi,
> I don't know exactly your use case but if you can use the grid instead, do
> so.
> No matter what way you will go, i'm sure everyone is interested in the
> outcome. ;)

it will be public ... soon ...

in any event, I have been playing with a custom cellrenderer and
found an interesting thing ...

_getContentHtml gets called realy often, way more than the the
number of rows in the table. I bet this is not optimal for
performance (not only for my canvas use case ) ...

if I resize a single column, then the method gets called once per
row, but when I resize the whole table (causing all the columns to
resize) then _getContentHtml for a single cell gets called once per
column of the table ...

cheers
tobi

> Martin
>
>
>
> oetiker wrote:
> >
> > Hi Martin,
> >
> > I was meditating on this problem tonight, and I see two scenarios:
> >
> > a) create a cellrenderer.Canvas which adds a canvas tag with a
> >    running id into the table and adds the values with the id into a
> >    queue.
> >
> >         _getContentHtml : function(cellInfo) {
> >             var id = this.__id+cellInfo.row+'x'+cellInfo.col;
> >             this.__queue.push([id,cellInfo.value]);
> >             return "<canvas id='"+id+"'></canvas>";
> >         },
> >
> >    using the  paneReloadsData I would then call the new 'update'
> >    method on the cellrenderer object, causing it to render all the
> >    canvas elements in the __queue, much like you suggested below.
> >
> > on the other hand,
> >
> > b) my use case is such that I am updateing the table every few
> >    seconds with new data coming from the server. Since I am
> >    replacing the entire table content on every update I wonder if
> >    this is the most efficient thing todo, especially since the table
> >    is only 10 - 100 lines long. I can see the browser using an
> >    increassing amount of memory as the table is being updated ...
> >
> > if the table aproach does not work I will try the grid layout
> > instead. This would would also solve the canvas issue since the
> > grid can contain normal widgets ...
> >
> > cheers
> > tobi
> >
> > Yesterday MartinWittemann wrote:
> >
> >>
> >> Hello Tobi,
> >>
> >> I just tried reproduce your problem but I guess there is no event exactly
> >> dedicated to such a scenario. I tried the paneReloadsData of the table
> >> pane
> >> and it worked more or less. Take a look at the modified table playground
> >> example to see how you could do it.
> >>
> >> function createRandomRows(rowCount) {
> >>   var rowData = [];
> >>   var nextId = 0;
> >>   for (var row = 0; row < rowCount; row++) {
> >>     rowData.push([ nextId++, " abc " ]);
> >>   }
> >>   return rowData;
> >> }
> >>
> >> // window
> >> var win = new qx.ui.window.Window("Table").set({
> >>   layout : new qx.ui.layout.Grow(),
> >>   contentPadding: 0
> >> });
> >> this.getRoot().add(win);
> >> win.open();
> >>
> >> // table model
> >> var tableModel = new qx.ui.table.model.Simple();
> >> tableModel.setColumns([ "ID", "HTML" ]);
> >> tableModel.setData(createRandomRows(10));
> >>
> >> // table
> >> var table = new qx.ui.table.Table(tableModel).set({
> >>   decorator: null
> >> })
> >> win.add(table);
> >>
> >> // table column model
> >> var tcm = table.getTableColumnModel();
> >> tcm.setDataCellRenderer(1, new qx.ui.table.cellrenderer.Html());
> >>
> >> var scroller = table.getPaneScroller(0);
> >> var pane = scroller.getTablePane();
> >> pane.addListener("paneReloadsData", function() {
> >>   console.log(document.getElementById("xx1"));
> >> }, this);
> >>
> >> Anyway, I will talk to Fabian, who is our Table maintainer. Perhaps he
> >> has a
> >> more elegant solution to this.
> >> Best,
> >> Martin
> >>
> >>
> >> oetiker wrote:
> >> >
> >> > Folks,
> >> >
> >> > I would like to place a canvas element into a table cell. Putting
> >> > the <canvas></canvas> html there is simple, but since I need access
> >> > to the DOM element to paint on the canvas and in the cellrenderer
> >> > I am only dealing with a html string I am a bit lost as to the best
> >> > aproach for this ...
> >> >
> >> > is there some event which I could listen for as to when the cells
> >> > html is put into the DOM ?
> >> >
> >> > cheers
> >> > tobi
> >> >
> >> >
> >> > --
> >> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> >> > http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900
> >> >
> >> >
> >> ------------------------------------------------------------------------------
> >> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >> > 30-Day
> >> > trial. Simplify your report design, integration and deployment - and
> >> focus
> >> > on
> >> > what you do best, core application coding. Discover what's new with
> >> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> > _______________________________________________
> >> > qooxdoo-devel mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >> >
> >> >
> >>
> >>
> >
> > --
> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> > http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

./generate.py build changes permissions of build/ directory

fritz
Hi,

running ./generate.py build with Qooxdoo-trunk changes the permissions of
the build/ directory to 777 (tested on Linux).

Is this a "feature/bug" or did I mess up something with our installation
(not that I would know how)?

Cheers,
Fritz

--
Oetiker+Partner AG tel: +41 62 775 99 03 (direct)
Fritz Zaucker                        +41 62 775 99 00 (switch board)
Aarweg 15                            +41 79 675 06 30 (mobile)
CH-4600 Olten                   fax: +41 62 775 99 05
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

qx.ui.table.model.Simple missing method getSortMethods()

fritz
Hi Qooxdoo gods,

the simple table model has a method setSortMethods(). However, it is missing
the matching getSortMethods() method.

As the sort methods are stored in a private variable (__sortMethods), it is
not possible to access the sort methods in a class extending
qx.ui.table.model.Simple. Currently the contributed Smart table model is not
fully functional for this reason.

Would it make sense to

a) make __sortMethods protected instead of private

or

b) add a getSortMethods() method?

I'd be willing to provide a patch for either of these variants, please
advice which you'd be willing to include into the code base ...

Thanks and best regards,
Fritz

--
Oetiker+Partner AG tel: +41 62 775 99 03 (direct)
Fritz Zaucker                        +41 62 775 99 00 (switch board)
Aarweg 15                            +41 79 675 06 30 (mobile)
CH-4600 Olten                   fax: +41 62 775 99 05
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

Derrell Lipman
On Tue, Nov 24, 2009 at 07:47, Fritz Zaucker <[hidden email]> wrote:
Hi Qooxdoo gods,

the simple table model has a method setSortMethods(). However, it is missing
the matching getSortMethods() method.

As the sort methods are stored in a private variable (__sortMethods), it is
not possible to access the sort methods in a class extending
qx.ui.table.model.Simple. Currently the contributed Smart table model is not
fully functional for this reason.

Would it make sense to

a) make __sortMethods protected instead of private

or

b) add a getSortMethods() method?

I'd be willing to provide a patch for either of these variants, please
advice which you'd be willing to include into the code base ...

Option (b) sounds appropriate. I agree there should be a way to retrieve what has been set, although I've never had a need for such thing. It's all done programatically (by the developer) in nearly every case, so the developer should know what has been set. In fact, because of that, I'd almost prefer that the getSortMethods() method be added as a mixin. I suppose it's small enough that it could be directly included in the Simple model, but enough small things add up to something big so I'm always thinking about how much use something will get before directly adding it to a class.

Derrell


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

fritz
Hi Derrell,

On Tue, 24 Nov 2009, Derrell Lipman wrote:

> On Tue, Nov 24, 2009 at 07:47, Fritz Zaucker <[hidden email]> wrote:
>
>> Hi Qooxdoo gods,
>>
>> the simple table model has a method setSortMethods(). However, it is
>> missing the matching getSortMethods() method.
>>
>> As the sort methods are stored in a private variable (__sortMethods), it
>> is not possible to access the sort methods in a class extending
>> qx.ui.table.model.Simple. Currently the contributed Smart table model is
>> not fully functional for this reason.
>>
>> Would it make sense to
>>
>> a) make __sortMethods protected instead of private
>>
>> or
>>
>> b) add a getSortMethods() method?
>>
>> I'd be willing to provide a patch for either of these variants, please
>> advice which you'd be willing to include into the code base ...
>>
>
> Option (b) sounds appropriate. I agree there should be a way to retrieve
> what has been set, although I've never had a need for such thing.

I also think that (b) is more appropriate than accessing protected variables
in the derived class.

> It's all done programatically (by the developer) in nearly every case, so
> the developer should know what has been set.

Fact is, that the Smart table model contribution (which extends the simple
table model) currently tries to access this.__sortMethods. This fails in the
build version as the private names are optimized "away".

As far as I understand from Smart.js there is some need to "know" the sort
models set on the table model to preserve the sorting across filtering of
the table rows. I am not sure if this goal could be achieved without
"knowledge" of the sort functions, but I doubt it.

> In fact, because of that, I'd almost prefer that the getSortMethods()
> method be added as a mixin.

If the above argument doesn't convince you, the mixin would be ok for me
too, I'd just like to fix/use and perhaps improve Smart.js without having to
patch Simple.js ...

> I suppose it's small enough that it could be directly included in the
> Simple model, but enough small things add up to something big so I'm
> always thinking about how much use something will get before directly
> adding it to a class.

As an getSortMethods() method would be implemented right next to the
setSortMethods() method in the source file, it seems more likely to get
adapted to whatever internal changes might occur in Simple.js in the future.
And if I don't overlook something, it would be basically a three-liner

   getSortMethods: function() {
       return this.__sortMethods;
   }

plus some lines of documentation.

So from a maintainenance point of view I'd vote for inclusion of a method in
Simple.js.

The most important issue for me would be, to have this solution included
into the framework itself, rather than having yet another contribution that
has to be tracked/maintained/installed separately.

I am not sure who is in charge of the table code,

> Derrell

you seem at least to know a lot about it.

If you can let me know how to proceed I'd be very grateful.

Thanks and best regards,
Fritz

--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

Derrell Lipman
On Tue, Nov 24, 2009 at 09:50, Fritz Zaucker <[hidden email]> wrote:
> what has been set, although I've never had a need for such thing.

> Option (b) sounds appropriate. I agree there should be a way to retrieve
I also think that (b) is more appropriate than accessing protected variables
in the derived class.

> It's all done programatically (by the developer) in nearly every case, so
> the developer should know what has been set.

Fact is, that the Smart table model contribution (which extends the simple
table model) currently tries to access this.__sortMethods. This fails in the
build version as the private names are optimized "away".

That is sufficient justification for a need to retrieve the sort methods. Yes, if you supply a tested patch, I will commit it. Please generate a bug report and then attach your patch to it, for tracking purposes.

Derrell


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

fritz
On Tue, 24 Nov 2009, Derrell Lipman wrote:

> On Tue, Nov 24, 2009 at 09:50, Fritz Zaucker <[hidden email]> wrote:
>
>> > what has been set, although I've never had a need for such thing.
>>
>>> Option (b) sounds appropriate. I agree there should be a way to retrieve
>> I also think that (b) is more appropriate than accessing protected
>> variables
>> in the derived class.
>>
>>> It's all done programatically (by the developer) in nearly every case, so
>>> the developer should know what has been set.
>>
>> Fact is, that the Smart table model contribution (which extends the
>> simple table model) currently tries to access this.__sortMethods. This
>> fails in the build version as the private names are optimized "away".
>
> That is sufficient justification for a need to retrieve the sort methods.
> Yes, if you supply a tested patch, I will commit it. Please generate a bug
> report and then attach your patch to it, for tracking purposes.

Cool, will do.

Thanks,
Fritz

--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

Fabian Jakobs
Administrator
Hi,

I see the need for a public getSortMethods(). Once the bug is there
either Derrell or I will apply it.

Best Fabian

> On Tue, 24 Nov 2009, Derrell Lipman wrote:
>
>  
>> On Tue, Nov 24, 2009 at 09:50, Fritz Zaucker <[hidden email]> wrote:
>>
>>    
>>>> what has been set, although I've never had a need for such thing.
>>>>        
>>>> Option (b) sounds appropriate. I agree there should be a way to retrieve
>>>>        
>>> I also think that (b) is more appropriate than accessing protected
>>> variables
>>> in the derived class.
>>>
>>>      
>>>> It's all done programatically (by the developer) in nearly every case, so
>>>> the developer should know what has been set.
>>>>        
>>> Fact is, that the Smart table model contribution (which extends the
>>> simple table model) currently tries to access this.__sortMethods. This
>>> fails in the build version as the private names are optimized "away".
>>>      
>> That is sufficient justification for a need to retrieve the sort methods.
>> Yes, if you supply a tested patch, I will commit it. Please generate a bug
>> report and then attach your patch to it, for tracking purposes.
>>    
>
> Cool, will do.
>
> Thanks,
> Fritz
>
>  


--
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


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

Fabian Jakobs
Administrator
In reply to this post by oetiker
Tobias Oetiker schrieb:

> Today MartinWittemann wrote:
>
>  
>> Hi tobi,
>> I don't know exactly your use case but if you can use the grid instead, do
>> so.
>> No matter what way you will go, i'm sure everyone is interested in the
>> outcome. ;)
>>    
>
> it will be public ... soon ...
>
> in any event, I have been playing with a custom cellrenderer and
> found an interesting thing ...
>
> _getContentHtml gets called realy often, way more than the the
> number of rows in the table. I bet this is not optimal for
> performance (not only for my canvas use case ) ...
>
> if I resize a single column, then the method gets called once per
> row, but when I resize the whole table (causing all the columns to
> resize) then _getContentHtml for a single cell gets called once per
> column of the table ...
>
> cheers
> tobi
>  
Hi Tobias,

can you file a bug for this? I plan to do a table bug fixing session
before the 1.0 release and this is something I should look at.

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


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: canvas in a table cell

oetiker
Hi Fabian,

Today Fabian Jakobs wrote:

> Tobias Oetiker schrieb:
> > Today MartinWittemann wrote:
> >
> >
> >> Hi tobi,
> >> I don't know exactly your use case but if you can use the grid instead, do
> >> so.
> >> No matter what way you will go, i'm sure everyone is interested in the
> >> outcome. ;)
> >>
> >
> > it will be public ... soon ...
> >
> > in any event, I have been playing with a custom cellrenderer and
> > found an interesting thing ...
> >
> > _getContentHtml gets called realy often, way more than the the
> > number of rows in the table. I bet this is not optimal for
> > performance (not only for my canvas use case ) ...
> >
> > if I resize a single column, then the method gets called once per
> > row, but when I resize the whole table (causing all the columns to
> > resize) then _getContentHtml for a single cell gets called once per
> > column of the table ...
> >
> > cheers
> > tobi
> >
> Hi Tobias,
>
> can you file a bug for this? I plan to do a table bug fixing session
> before the 1.0 release and this is something I should look at.

done 3111

cheers
tobi
>
> Best Fabian
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.ui.table.model.Simple missing method getSortMethods()

fritz
In reply to this post by Fabian Jakobs
Bug 3115.

Cheers,
Fritz

On Wed, 25 Nov 2009, Fabian Jakobs wrote:

> Hi,
>
> I see the need for a public getSortMethods(). Once the bug is there
> either Derrell or I will apply it.
>
> Best Fabian
>> On Tue, 24 Nov 2009, Derrell Lipman wrote:
>>
>>
>>> On Tue, Nov 24, 2009 at 09:50, Fritz Zaucker <[hidden email]> wrote:
>>>
>>>
>>>>> what has been set, although I've never had a need for such thing.
>>>>>
>>>>> Option (b) sounds appropriate. I agree there should be a way to retrieve
>>>>>
>>>> I also think that (b) is more appropriate than accessing protected
>>>> variables
>>>> in the derived class.
>>>>
>>>>
>>>>> It's all done programatically (by the developer) in nearly every case, so
>>>>> the developer should know what has been set.
>>>>>
>>>> Fact is, that the Smart table model contribution (which extends the
>>>> simple table model) currently tries to access this.__sortMethods. This
>>>> fails in the build version as the private names are optimized "away".
>>>>
>>> That is sufficient justification for a need to retrieve the sort methods.
>>> Yes, if you supply a tested patch, I will commit it. Please generate a bug
>>> report and then attach your patch to it, for tracking purposes.
>>>
>>
>> Cool, will do.
>>
>> Thanks,
>> Fritz
>>
>>
>
>
>

--
Oetiker+Partner AG tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel