red - Rebol code gui working but not clearing fields -


i trying following code user enters 2 numbers , on clicking calculate button, answer should shown. there buttons clearing fields , exiting.

rebol[]  fields: [f-ht f-wt ans] reset-fields: [     unfocus     f-ht/text: " "   ; changing "enter number here" not     f-wt/text: " "     focus f-ht ]  oncalc: [      ans/text: (to integer! f-wt/text) / ((100 * integer! f-ht/text) * (100 * integer! f-ht/text))     show fields ]  lo: layout [     style tx label 200x24 center     style fld field 200x24 center     style btn button 200x24 center      tx "first number:"      f-ht: fld      tx "second number:"      f-wt: fld      btn "calculate" [oncalc]                        ans: tx "answer"     btn "clear" [reset-fields show fields]     ; not working- nothing happens     btn "exit" escape [unview/only lo] ] reset-fields view center-face lo 

the gui showing right. however, there following problems:

on clear button clicking, nothing happening. 

there no changes on gui , no errors being reported. problem , how can solved? help.

clear fields instead of setting new strings

reset-fields: [    unfocus    clear f-ht/text      clear f-wt/text    focus f-ht ] 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -