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

[REBOL] Re: Conserve an history within the face

From: sunandadh:aol at: 12-Nov-2002 11:48

> Is it possible to use the proprieties of a face (like face/self/data) to > conserve the last/or first content of the face (i.e a field or an area) or > even the history of the changes.
By using styles, you can define your own field in a face. Example below extends 'button to add 'my-block, 'my-counter and my-object to each button of tyoe 'my-button. ;; define a style for later use in layout my-styles: Stylize [ my-button: button with [my-block: copy [1 2 3 4 5] my-counter: 1 my-object: make object! [date: now title: "hello"] ] ] unview/all ; layout with new style view/new layout [ styles my-styles a-button: my-button "A" b-button: button "B" ] ;; a-button has extra fields print mold first a-button ;; b-button does not print mold first b-button Sunanda.