Dynamic Data Table Layouts/Lists
[1/7] from: james:mustard at: 16-Mar-2002 20:43
Hi folks, i've been puddling about with dynamic data displays and MySQL
access in REBOL and have found it to be very flexible.
An example of some work is: http://www.mustard.co.nz/rebol/dynamic-list.jpg
This is achieved through the following script (inspired in part by some Jeff
Kreiss work)
`-----------------------------------------
REBOL[
Title: "Dynamic List Layouts"
Author: "James Marsden"
Date: 16-Mar-2002
Purpose: "Shows a way to make a dynamic table with MySQL data and add
highlights etc.."
Comment: {This is a few ideas thrown together from a Jeff Kreis
list example and uses DocKimbel's MySQL dialect}
]
change-dir %mysql-r099
do %mysql-protocol.r
db: open mysql://[root--localhost]/DSysData
insert db "select CaseID, DebtorSurname, DebtorFirstname, BUPDate from
caseinfo"
rst: copy/part db 200
cnt: 0
view layout [
across
tbl: list 400x500 [across space 0 text 100 edge [size: 1x0 color: black
effect: none] text 100 edge [size: 1x0 color: black] text 100 edge [size:
1x0 color: black] text 100 edge [size: 1x0 color: black] ]
supply [
count: count + cnt
face/color: 192.255.168
face/font/color: black
face/font/style: none
face/text: none
if even? count [face/color: white]
if even? index [face/color: face/color - 25.25.25]
if none? v: pick rst count [exit]
face/text: pick v index
;a variety of column testing could be added here
if face/text = 16-Mar-1995 [face/color: yellow]
if not none? find/any pick v 2 "Sm*" [face/color: blue face/font/color:
yellow face/font/style: [bold underline]]
if (pick v 1) = "0000300014" [face/color: 255.64.0 face/font/color:
white]
]
sld: slider 16x500 [
c: max 0 to-integer (length? rst) * value
if c <> cnt [cnt: c show tbl]
] return
]
close db
`-----------------------------------------
What I am interested in finding out is are there any others who are working
in the area of editable tables? Here I am thinking of basic spreadsheet /
cell editing functionality as well as display. Can the list object be
mangled in this way?
Another query is does anyone who has used IOS know if there is better
spreadsheet style handling available than the basic list object from view?
Regards,
James
[2/7] from: greggirwin:mindspring at: 16-Mar-2002 11:11
Hi James,
<< What I am interested in finding out is are there any others who are
working
in the area of editable tables? Here I am thinking of basic spreadsheet /
cell editing functionality as well as display. Can the list object be
mangled in this way? >>
Sunanda has developed some grid/tree code, and Ryan recently posted some as
well. I'm heading down a slightly different path, which is to render the
data with DRAW commands and then create just one, or a few, live faces for
editing when necessary. For a small number of items, dynamic layouts should
work fine. The issue with them will be scalability. For really large numbers
of faces, you'll have to do some kind of creation/destruction as things move
around, or just impose upper limits on things, which is also a viable
alternative.
<< Another query is does anyone who has used IOS know if there is better
spreadsheet style handling available than the basic list object from >>
Not that I know of. Though Allen is working on some style ideas as well, I
think.
--Gregg
[3/7] from: henrik:webz:dk at: 16-Mar-2002 18:20
Hi, James
16-03-2002 08:43:45, "James Marsden" <[james--mustard--co--nz]> wrote:
>Hi folks, i've been puddling about with dynamic data displays and MySQL
>access in REBOL and have found it to be very flexible.
>
>An example of some work is: http://www.mustard.co.nz/rebol/dynamic-list.jpg
Nice. :-)
<program source snipped>
>What I am interested in finding out is are there any others who are working
>in the area of editable tables?
I'm thinking of working actively in this area, as I need dynamic editable tables using
mysql myself.
> Here I am thinking of basic spreadsheet /
>cell editing functionality as well as display. Can the list object be
>mangled in this way?
I'm pretty frustrated about the lack of documentation about lists, and would probably
rather build a new object from scratch.
Couldn't this be achieved through creating a grid of whatever gadgets you want and put
them in a pane?
From what I can see, you're half-way there.
There's a simple example of an editable list in http://www.rebol.com/view/demos/todo-list.r
I would personally like a new standard list object with the same features as you see
in Windows' lists with sorting, flexible row width, etc. For that matter, it wouldn't
be bad with a standard tree view
object either.
Regards,
Henrik Mikael Kristensen
[4/7] from: g:santilli:tiscalinet:it at: 16-Mar-2002 13:08
Hi James,
On Saturday, March 16, 2002, 8:43:45 AM, you wrote:
JM> What I am interested in finding out is are there any others who are working
JM> in the area of editable tables? Here I am thinking of basic spreadsheet /
Yup. :)
Nothing in a state that can be released yet, but if you are
interested and are brave enough to have a look at some messy
code... ;-)
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[5/7] from: tbrownell:shaw:ca at: 16-Mar-2002 13:34
Oh ya, here it is.. RebolCalc.. in the library under math... and here's the
original posting from Carl...
{
Guess what folks... We've only scratched the surface...
Here is a one page spreadsheet program. Don't let its tiny size fool you.
It is *very* powerful... because any cell can be any REBOL expression.
Numbers, dates, times, money, pairs, etc. are all valid.
You can refer to cells by name, such as: A1 B1 C2 D8
And, you can use formulas such as: =A1 * B2 - length? C4
The possibilities boggle the mind. This is REBOL, so any
of the cells can include network protocols. For instance,
grab a number from your email and multiply it by currency on a
web page. ;) You get the idea.
do http://www.reboltech.com/library/scripts/rebocalc.r
Now imagine... what if Rebocalc and RIM were combined...
REBOL with a cause,
-Carl
}
TB
[6/7] from: james:mustard at: 17-Mar-2002 11:41
Gabriele Santilli wrote:
> Nothing in a state that can be released yet, but if you are
> interested and are brave enough to have a look at some messy
> code... ;-)
>
Sounds great :) Do I visit your rebsite for a peek? :)
James.
[7/7] from: tbrownell::shaw::ca at: 16-Mar-2002 13:29
If I recall, Carl S. had a fully functioning spreadsheet demo, complete with
rebol-coded cells.
It's out there somewhere?
TB