[Gambas-user] TableView Problem

nando nando_f at ...951...
Mon Nov 7 15:26:50 CET 2005


Thank you Rolf and Benoit.

By no means am I blaming anyone *especially* Benoit.
But instead, I thank many persons especially Benoit
every time I begin a Gambas IDE.

I believe understanding how the component works will
lead to a better solution.

My current project requires data on the screen
like TableView offers except I need something static.
Each cell could have a different
-text
-foreground color
-background color
-font
which means I need an collection array, or
four parallel arrays or 4-D array or similar.
A static component would relieve the data storage burden.
In my VB world, The 'Flexgrid' did this.

Benoit,
Is there a tableview component that works statically for each cell
that is unused/unimplememted??

Thank you
-Fernando



---------- Original Message -----------
From: Benoit Minisini <gambas at ...1...>
To: gambas-user at lists.sourceforge.net
Sent: Mon, 7 Nov 2005 10:22:27 +0100
Subject: Re: [Gambas-user] TableView Problem

> On Monday 07 November 2005 08:45, Eilert wrote:
> > Hi Fernando,
> >
> > you are right :-) I tried this
> >
> > > To count the _DATA events, do (similar to) the following.
> > >
> > > Create a label called Label_Count
> > > with TEXT as 0 (zero)
> > >
> > > The first code line inside the _Data event for the TableView..
> > > Label_Count.Text = Label_Count.Text + 1
> > >
> > > ... now scroll and/or click on your TableView.
> > >
> > > Watch the count
> >
> > and it turned out that even dragging another window over a TableView
> > will trigger the _DATA event. So, yes, if in code you connect it
> > directly to SQL queries, I guess you get into trouble.
> 
> Not strange, as the TableView buffers nothing.
> 
> > The only way to 
> > make it fast is to buffer the data in an array. Very strange.
> 
> But the SQL Result object *is* a buffer, so you don't have to do 
> that. Just use the Result object as a buffer.
> 
> >
> > However, on my machine this doesn't cause much CPU load. So, is this
> > discussion somewhat academical? Benoit is not to blame for it, the
> > Trolltech guys are. We cannot change this. So what?
> >
> > > Also, notice how the Label is a static control.
> > > Its implementation is opposite to your comment.
> >
> > Well - my comment was to never let graphical controls store any data for
> > you, just display them. The only exception perhaps is with input
> > controls like text boxes. You won't have another chance than accepting
> > that they keep the original data for the time of user input (though you
> > still could catch every keystroke and save it in parallel somewhere else).
> >
> > During the last years I found that most data you want to display have to
> > be processed before displaying, i. e. in case you let the displaying
> > control save the data, you will have to re-process the data into the
> > saving format afterwards because the user might have changed something
> > (except when they're for display only, but this is a rare case here).
> > This will make it necessary to write a lot of code reacting to clicks
> > and processing/reprocessing data. So the program may become somewhat
> > difficult to overview.
> >
> > I found the advice from the guy (or guys) was good for me and my kind of
> > projects. At that time, I had programmed one thing that displayed data
> > processing them for display and displaying them in table view (this was
> > VB then). After discussing some items with those folks, I began to code
> > a new version of the software, and during the talks I got this advice.
> > After trying to split my new program into distinct layers of storage,
> > processing and display, I found it made it much clearer, so I'm
> > following this rule ever since.
> >
> > Rolf
> >
> 
> Good advice :-)
> 
> 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