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

Conserve an history within the face

 [1/3] from: info::id-net::ch at: 12-Nov-2002 10:57


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. I tried to use self/data to conserve it but then self/data re-get the new content, not the first one. Even if I store the initial content with a condition (if numberClick = 1) [face/self/data: face/self/text].. each time i print the face/self/data is still the new one, not the old one... Anyone has a solution? Philippe

 [2/3] from: rotenca:telvia:it at: 12-Nov-2002 15:04


Hi Philippe,
> 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.
You should use user-data, not data which is often used and changed by the style: view layout [ toggle true with [ append init [ user-data: reduce [data] ] ] [ append face/user-data face/data probe face/user-data ] ] --- Ciao Romano

 [3/3] from: sunandadh:aol at: 12-Nov-2002 11:48


Phiippe:
> 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.