Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

Q on efficiently showing large BLT vectors in tabular format


I've got a BLT graph using several BLT vectors, each with as much as
86,000+ values. I want to see the textual form of this information in a
tabular format.

What I don't want is to duplicate the data (read: copy each vector's
data into a list variable and use a listbox for each vector, for
example). I'm looking for something similar to hugelist [1] or
virtuallist [2] but tuned specifically for BLT vectors.

Does anyone know of such a beast?

[1] http://wiki.tcl.tk/6784
[2] http://wiki.tcl.tk/10035

Thanks.

--
Bryan Oakley
http://www.tclscripting.com

Nobody had a reply, but for those who may stumble onto this thread in
the future...

The solution was pretty simple. I just wrote my own custom
scrollbar-handling code and tied it to a tablelist widget. Admittedly it
took half a day or so to get it right but in the end it's only 60 lines
of code or so, and I could probably cut that in half if I had the time.

The idea is to take the scrollbar values (two numbers between 0.0 and
1.0) and use those to compute the range of elements in the vector(s) to
be displayed. Using features from the tablelist, I'm able to grab the
data with [$vector range $top $bottom] and just drop it in the tablelist
one column at a time. And, of course, as I add data to the vectors I
have to update the scrollbars so they are relative to the total amount
of data available.

As an aside, this is the second time in about as many years that I've
had a need to use BLT, and I'm again reminded of just how powerful the
BLT graph and vector functionality is. If you've not used it before, I
don't think it's an understatement to say that it does way more than you
might imagine it does.

--
Bryan Oakley
http://www.tclscripting.com

Bryan Oakley wrote:
> Nobody had a reply, but for those who may stumble onto this thread in
> the future...

> The solution was pretty simple. I just wrote my own custom
> scrollbar-handling code and tied it to a tablelist widget. Admittedly it
> took half a day or so to get it right but in the end it's only 60 lines
> of code or so, and I could probably cut that in half if I had the time.

don't ya'  love Tcl ;)

> The idea is to take the scrollbar values (two numbers between 0.0 and
> 1.0) and use those to compute the range of elements in the vector(s) to
> be displayed. Using features from the tablelist, I'm able to grab the
> data with [$vector range $top $bottom] and just drop it in the tablelist
> one column at a time. And, of course, as I add data to the vectors I
> have to update the scrollbars so they are relative to the total amount
> of data available.

> As an aside, this is the second time in about as many years that I've
> had a need to use BLT, and I'm again reminded of just how powerful the
> BLT graph and vector functionality is. If you've not used it before, I
> don't think it's an understatement to say that it does way more than you
> might imagine it does.

I'll have to second that, it is very simple to do some very nice things,
incredibly powerful & *fast*

Bruce

Bryan Oakley schrieb:

> Nobody had a reply, but for those who may stumble onto this thread in
> the future...

> The solution was pretty simple. I just wrote my own custom
> scrollbar-handling code and tied it to a tablelist widget. Admittedly it
> took half a day or so to get it right but in the end it's only 60 lines
> of code or so, and I could probably cut that in half if I had the time.

may be you convince george howlett to include this in blt.
According to the cvs-changes he is working again on blt.
I hope he can make it TEA compatible :)

rene

Bruce Hartweg wrote:
> Bryan Oakley wrote:
>> Nobody had a reply, but for those who may stumble onto this thread in
>> the future...

>> The solution was pretty simple. I just wrote my own custom
>> scrollbar-handling code and tied it to a tablelist widget. Admittedly
>> it took half a day or so to get it right but in the end it's only 60
>> lines of code or so, and I could probably cut that in half if I had
>> the time.

> don't ya'  love Tcl ;)

As a matter of fact, yes!

I was in high-praise mode just this morning while talking to a
co-worker, marveling about the foresight JO had in designing Tk. His
designs have really stood the test of time.

To be able to take vectors from BLT, a megawidget for displaying tables
of information, and a stock scrollbar, and make them all work together
seamlessly (with zero performance problems) is a testament to good
design by all those involved.

--
Bryan Oakley
http://www.tclscripting.com

Hello Bryan,

> Nobody had a reply, but for those who may stumble onto this thread in
> the future...

I am not used to write (anymore) in newsgroups, and I thought the
answer was obvious.
Am I the only one to play with Tktable? Using Tktable with -command is
exactly what you want.
I use it everyday with SQLite, displaying queries of approx. 25000
rows. in less than a second.

--
-eric

I've toyed with tktable, but in all the years I've done Tk programming
I've only once or twice ever needed to display tables of data so it's
not part of my normal toolchest.

We don't use tktable in our product so I wouldn't have considered it
unless it was the only solution. Fortunately I've proven it isn't. My
ultimate solution required only about 80 lines of code in its currently
un-optimized state.

Thanks anyway!

--
Bryan Oakley
http://www.tclscripting.com

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc