[Gambas-user] TableView Problem

nando nando_f at ...951...
Wed Nov 2 18:42:20 CET 2005


Benoit,
I appreciate the reply.
Thank you.


---------- Original Message -----------
From: Benoit Minisini <gambas at ...1...>
To: gambas-user at lists.sourceforge.net
Sent: Wed, 2 Nov 2005 18:14:36 +0100
Subject: Re: [Gambas-user] TableView Problem

> On Wednesday 02 November 2005 17:57, nando wrote:
> > Thank you to the all who gave examples for TableView.
> >
> > TableView is still implemented incorrectly.
> >
> > TableView, *unlike* controls in VB (like Flexgrid), requires
> > a 2D array of some data (integer,string,etc) to 'refresh' the
> > TableView when it needs it. Hundreds of events fire wasting the CPU.
> > TableView is supposed to be like that in Flexgrid and others.
> > When data is placed in a cell, it is held static there until it is
> > changed.  It is not the responsibility of Program code to refresh it.
> > It is the responsibility of the control to do that.
> > Scrolling the Tableview (or clicking on it) isn't supposed to
> > require _Data event to fire because the data is already in cells.
> >
> > Why does the data disappear when scrolled ?
> > It's not supposed to.
> > It doesn't make sense.
> > Even the QT control works 'statically'
> > TableView is implemented incorrectly.
> >
> 
> It is not "incorrect", it is just the way it is designed.
> 
> > If one is to have a TableView with data from many tables in MySQL,
> > this means that all scrolling and clicking REQUIRES the MySQL
> > queries be performed repeatedly because the cells are 'erased' every
> > scroll.
> 
> You don't.
> 
> Once you have have done the query, you can keep it in memory and use 
> it each time you have to handle the Data event.
> 
> > If it is a complex page with a lot of scrolling, 
> > we are speaking of hundreds and thousands of queries.
> > Or, if, instead, a 'shadow' array is kept, then hundreds and thousands
> > of events are fired (_Data) just to repaint.
> >
> 
> > This is not correct.
> >
> > But, perhaps, I am missing something.
> >
> > Please inform me of my mis-understanding and mis-quidance.
> >
> > -Fernando
> >
> 
> A good way to handle all these things would be having a "data 
> source" model that allows any control to manage its data itself 
> (like TreeView, ColumnView...), or to let the user provides the data 
> on demand (like TableView).
> 
> Both methods are useful. There is no one "correct" method, and 
> another "not correct".
> 
> But this "data source" model have to be done!
> 
> Regards,
> 
> -- 
> Benoit Minisini
> 
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list