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

[REBOL] Text field mysteries

From: henrik::webz::dk at: 26-Apr-2004 14:05

Hi, all I'm creating a text field which will display in a different color with the text "Required!" for an address form. The code: view layout [ name-field: field [ either any [ 0 = length? name-field/text equal? name-field/text "Required!" ][ name-field/text: "Required!" probe name-field/text ; shows up blank sometimes! name-field/colors/1: 255.150.50 ][ name-field/colors/1: 240.240.240 name-field/font/color: black ] show name-field ] ] When run, "Required!" is supposed to be displayed after you've skipped through the field, but forgot to enter information. This works, if the you don't enter anything and the field isn't dirty?. When you enter something, that'll be displayed in the correct color, but if you delete it again, I want "Required!" to be displayed again, but only the color is correct, the field is blank. Probing name-field/text gives "" just after I've set it in the code. If I escape and do a name-field/text: "Required!" show name-field manually, "Required!" shows fine. The behavior matches the contents of the dirty? flag, but if I set it to none, the behaviour stil continues. What's wrong? -- Regards, Henrik Mikael Kristensen