Atif Iqbal <cs_future@...> wrote:
> I am new to Haskell and wxhaskell.
> I want to get a string from one text box,process it on button click
> and show the result in another test box on the same window.
In that case, you only need to modify your code a little, to move the
point at which you read the text until after the button press.
> stxt <- textEntry p [enabled := True]
> textlog <- textCtrl p [enabled := False, wrap := WrapNone]
> -- use text control as logger
> textCtrlMakeLogActiveTarget textlog
> mytext <- textCtrlGetValue stxt
> eval <- button p [text := "Process", on command := logMessage mytext]
change last two lines to:
eval <- button p [ text := "Process"
, on command := do mytext <- textCtrlGetValue stxt
logMessage mytext ]