Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Looking for help

From: jrichards:starband at: 4-Mar-2002 13:37

Any help would be appreciated. I have been playing around with developing a data entry and retrieval system and I am having trouble with the text-list display with the find function. The find function itself works great but I can't figure out how to display the found records. Thanks Jim Rebol [ Title: "MySQL Data Entry" Author: "Jim Richards" Version: 0.1 Date: 22-Feb-2002 ] do %/d/rebol/view/mysql-protocol.r g-fname: [] g-lname: [] fields: [f-fname f-lname f-addr1 f-addr2 f-city f-state f-zip1 f-zip2 f-email f-phone1 f-phone2] main: layout [ style tx label right 100x24 style fld field 200x24 across tx "First Name: " f-fname: fld 196 return tx "Last Name: " f-lname: fld 196 return tx "Address: " f-addr1: fld 196 return tx "Address: " f-addr2: fld 196 return tx "City: " f-city: fld 196 return tx "State: " f-state: fld 196 return tx "Zip: " f-zip1: fld 45 f-zip2: fld 45 return tx "Email Address: " f-email: fld 196 return tx "Home Phone: " f-phone1: fld 196 return tx "Cell Phone: " f-phone2: fld 196 return pad 90 button "Clear" [reset-fields show fields] button "Add" [add-rec] button "Find" [ view/new center-face find-scr: layout [ style tx label right 100x24 style fld field 100x24 across tx "Last Name: " f-lname: fld return tx "Home Phone: " f-phone1: fld return button "Find" [find-rec] below pad 30 list: text-list [g-fname/text g-lname/text] ] ] ] reset-fields: does [ unfocus clear-fields main show main focus f-fname ] add-rec: does [ db: open mysql://richards:?@localhost/test insert db [{insert into play (fname, lname, addr1, addr2, city, state, zip1, zip2, email, phone1, phone2) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) } f-fname/text f-lname/text f-addr1/text f-addr2/text f-city/text f-state/text f-zip1/text f-zip2/text f-email/text f-phone1/text f-phone2/text ] close db reset-fields ] update-rec: does [ ] find-rec: does [ db: open mysql://richards:?@localhost/test insert db [{select * from play where lname = (?)} f-lname/text] foreach row copy db [ append g-fname probe row/1 append g-lname probe row/2 ] close db show find-scr ] reset-fields view center-face main