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

[REBOL] Iterated check box anomaly

From: geza67:freestart:hu at: 12-Apr-2002 19:37

Hello REBOLers! I have a question upon a strange behavior of an iterated check box. The list contains a checkbox and an explanatory text per row. Here is the code snippet: a: copy [] q: [ ["1" "Setup"] ["2" "Install"] ["3" "Post-install"] ["4" "Run"] ] view layout [ below list 550x180 [ across origin 2x2 answer: check [ probe a: either probe answer/data [ sort unique append a answer/text ][ sort difference a compose [(answer/text)] ] show answer ] question: info wrap 500 ] supply [ if count > length? q [face/show?: false exit] face/show?: true face/text: q/:count/:index ] ] If I, e.g. select the first answer, then the check box redraws appropriately; thereafter if I select the second answer too, the check box remains in "false" state after the first click - only the second mouse click toggles it's state to "true". Probing the state of the checkbox and the list of answers reveals that the first click on the check box does not toggle it's state IF the previous selection (on another check box) resulted in the same state. I.e. YES-YES or NO-NO answers on two different checkboxes do not toggle the state of the second one, only alternating selections (YES-NO). Despite the visual fault, the action code executes properly and updates the answer block: true ["1"] false ["1" "2"] true ["1" "2"] This is strange: the checkboxes appear to behave as if they were ONE, if they were the SAME face visually but the branching upon their individual logical state executes normally and fills the answer block appropriately. Is there a way to overcome this in an iterated list or should I accept that sometimes two clicks are needed to toggle the "visual" state of a checkbox? Thanx for your ideas Geza