Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. b: [
  2. LoginScreen: [
  3. grid 2 2 padding 10 spacing 10 [
  4. label "User name:"
  5. username: text-input
  6. label "Password"
  7. password: text-input password
  8. ]
  9. ]
  10. ]
  11.  
  12. screen: [object [name: set-word! contents: into widget]]
  13.  
  14. widget: [
  15. object [
  16. opt [id: set-word!] [
  17. type: 'grid rows: number! cols: number!
  18. any ['padding padding: number! | 'spacing spacing: number!]
  19. contents: into [collect [some [keep widget]]]
  20. |
  21. type: 'label label: string!
  22. |
  23. type: 'text-input is-password: ['password (true) | (false)]
  24. ]
  25. ]
  26. ]
  27.  
  28. result: parse b screen
  29.  
  30. print mold result
  31.  
  32. object none [
  33. name: LoginScreen:
  34. contents: object none [
  35. type: 'grid
  36. rows: 2
  37. cols: 2
  38. padding: 10
  39. spacing: 10
  40. contents: [
  41. object none [
  42. type: 'label
  43. label: "User name:"
  44. ]
  45. object none [
  46. id: username:
  47. type: 'text-input
  48. is-password: false
  49. ]
  50. object none [
  51. type: 'label
  52. label: "Password"
  53. ]
  54. object none [
  55. id: password:
  56. type: 'text-input
  57. is-password: true
  58. ]
  59. ]
  60. ]
  61. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement