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

[REBOL] how to save text in area to file

From: slok00::yahoo::com at: 23-Dec-2001 5:58

How can I save the text that a user keys into a area on a panel? In Panel 1, I have an area for user to key in text and a button "Save". How can I do it such that when the button "Save" is pressed, the text in the area will be saved to a pre-define text file. My code is as follows... ======================== REBOL [ Title: "Save to File" ] filename: %index.html main: layout [ vh2 "Subpanel Examples" guide pad 20 button "Panel 1" [panels/pane: panel1 show panels] button "Panel 2" [panels/pane: panel2 show panels] button "Quit" [quit] return box 2x240 maroon return panels: box 420x240 ] panel1: layout [ origin 8x8 h2 "Panel 1" button "Save" [alert "File saved."] area wrap ] panel2: layout [ origin 8x8 h2 "Panel 2" across txt "X:" slider 150x16 return txt "Y:" slider 150x16 return check [panel2/color: maroon show panel2] txt "Don't click this" return check [panel2/color: silver show panel2] txt "Click this" return ] panel1/offset: 0x0 panel2/offset: 0x0 panels/pane: panel1 center-face main view main ====================================== Thanks Yek Soon