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

[REBOL] Clearing fields

From: didier:jacquemart:libertysurf at: 6-May-2002 21:30

Hi, I wrote a small program to try text-list. Goal of the program : pick up the name of a month in the list, then display the number of days for this month. I got an unattented problem with a variable : on the first try, the result is ok. On the second try, the result remains unchanged, not beeing cleared from the first try. Trying it in console mode, it works fine. I think there's a problem with VID interface. I tried a 'clear' but it doesn't work. What is the problem ? Following is my program source ====================== REBOL [] xmois: ["Janvier" "Février" "Mars" "Avril" "Mai" "Juin" "Juillet" "Aout" "Septembre" "Octobre" "Novembre" "Décembre"] xjour: [31 28 31 30 31 30 31 31 30 31 30 31] ;wmess: copy [] view layout [ tlm: text-list data xmois button "Nombre de jours" 150 [ wmess: copy [[ "Le mois de xxx comprend yy jours"]] ;append mess [[ "Le mois de xxx comprend yy jours"]] replace/all wmess/1/1 "xxx" tlm/picked ii: index? find xmois tlm/picked;; is there a quicker way to get the index selected ? replace/all wmess/1/1 "yy" (pick xjour ii) print tlm/picked; ok print wmess/1/1; ok on the first time alert wmess; ok on the first time ] ] Thanks, Didier.