[REBOL] Dynamic Data Table Layouts/Lists
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