Note: the source can be found here: <a href="http://www.students.cs.uu.nl/~jtkman/Application.hs">http://www.students.cs.uu.nl/~jtkman/Application.hs</a> (It's my own work, please tell me what I did wrong)<br><br>
<div class="gmail_quote">2009/4/16 Tsunkiet Man <span dir="ltr"><<a href="mailto:temp.tsun@gmail.com">temp.tsun@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hello,</div>
<div> </div>
<div>I'm trying to create a GUI by using wxHaskell. However I get the weird error message of "Not in scope "dt"", well so I sorted them so that my so called "dt" was in scope, however it failed. Can someone please tell me how I can solve this error?</div>
<div> </div>
<div> ... A lot of code that is not relevant in my opinion, if I'm wrong please correct me and I will post my full code</div>
<div> </div>
<div> --Debug text --<br> dt <- staticText f [text := "Hello world!"]<br> <br> imagePanel <- panel f [position := Point 2 2, clientSize := Size 100 100, tooltip := "This is a drawPanel", bgcolor := rgb 255 255 255]<br>
set f [ clientSize := Size 700 500,<br> menuBar := [mFile, mHelp], <br> visible := True, <br> on (menu exit) := close f, <br> on (menu open) := onOpen f vFile ]<br>
<br> <br> return ()<br> <br> where <br> onOpen :: Frame a -> Var b -> IO ()<br> onOpen frame var = do file <- fileOpenDialog frame False True "Open File" [("PGM bestanden (*.pgm)",["*.pgm"]),("Alle bestanden (*.*)",["*.*"])] "" ""<br>
case file of<br> Nothing -> return ()<br> Just file -> set dt [text := "HELLO"]<br>
return ()</div>
<div> </div>
<div>Thank you for your help, I really owe haskell-cafe.</div>
<div> </div>
<div>Greetings Tsunkiet Man</div></blockquote></div><br>