[Haskell-cafe] do construct in wxhaskell

Jodi-Ann Prince j_prince2109 at hotmail.com
Sat Apr 12 02:04:09 EDT 2008

hi, im working ona project, and im having problem loading some code in wxhaskell:
onOpen :: Frame a -> TextCtrl b -> MenuItem c -> StatusField -> IO ()
onOpen f sw mclose status = do   mbfname <- fileOpenDialog f False True "Open image" fileTypes "" ""                                              case  (mbfname) of                                              (Nothing)      -> return ()
                                              (Just (fname)) -> do   fileContent <- readFile fname
                                                                             set sw [text := fileContent]                                                                             set mclose [enabled := True]                                                                              set status [text := fname]                                              return ()
i keep getting the error : "the last statement in a 'do' construct must be an expression."
ive tried rearranging it many times, but i still get the same error. any help would be greatly appreciated.
Connect to the next generation of MSN Messenger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080412/09659f79/attachment.htm

More information about the Haskell-Cafe mailing list