Advertisement
johnorork

Untitled

Apr 14th, 2014
1,126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rebol []
  2. ;when I change the literal values in the original testimp program it won't produce errors if i change them to strings but
  3. ; I cant do that because I want to change them to dates times and decimals for the other fields . If i do that then the program blows
  4. ; blows up. I'm just not sure what variables it needs from my layout or whether I need intermediate variables.
  5. ;renamed filtered-input.r since it doesn't seem to be able to be read by the interpreter
  6. do %filtimp.r
  7.  
  8. user-data: [
  9. name vname/text
  10. edate vdate/text
  11. etime vtime/text
  12. einc vinc/text
  13. ]
  14.  
  15. validate-rules: [
  16. name: string!
  17. edate: string!
  18. etime: string!
  19. einc: string!
  20. ]
  21.  
  22. view layout [
  23.     text "name" vname: field
  24.     text "edate" vdate: field
  25.     text "etime" vtime: field
  26.     text "income" vinc: field
  27.    
  28.     button "validate" [
  29.     import/else user-data validate-rules 'errors
  30.     ]
  31. ]
Advertisement
RAW Paste Data Copied
Advertisement