From: Doaitse S. <do...@cs...> - 2007-02-16 13:14:59
|
ad 1) It has been pointed out to me that you can call the enableGUI =20 >> main only once; otherwise you get the problem I had ad 2) I made a mistake in thinking that the a.out would always be =20 used. So bad reading of the instructions from my side. Sorry. Doaitse On Feb 16, 2007, at 1:40 PM, Doaitse Swierstra wrote: > When trying to run even the smallert wx program in my Mac OS X =20 > 10.4, Intel: > > module Main where > import Graphics.UI.WX > import EnableGUI > > main :: IO () > main > =3D start hello > > hello :: IO () > hello > =3D do f <- frame [text :=3D "Hello!"] > quit <- button f [text :=3D "Quit", on command :=3D close f] > set f [layout :=3D widget quit] > > I get: > > koshka:~/Desktop/TestWX doaitse$ ghci -package wx -fglasgow-exts =20 > Main.hs > ___ ___ _ > / _ \ /\ /\/ __(_) > / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell =20= > 98. > / /_\\/ __ / /___| | http://www.haskell.org/ghc/ > \____/\/ /_/\____/|_| Type :? for help. > > Loading package base ... linking ... done. > Loading package haskell98 ... linking ... done. > Loading package wxcore-0.10.1 ... linking ... done. > Loading package wx-0.10.1 ... linking ... done. > [1 of 2] Compiling EnableGUI ( EnableGUI.hs, interpreted ) > [2 of 2] Compiling Main ( Main.hs, interpreted ) > Ok, modules loaded: EnableGUI, Main. > *Main> enableGUI >> main > *Main> enableGUI >> main > Bus error > koshka:~/Desktop/TestWX doaitse$ > > > So note that the first time the button appears, but the second time =20= > I try to run it I get the bus error. > > This doesn't look good to me ;-{{, but I have no idea what to do next? > > The other unhealthy thing is that if I comment out the EnableGUI =20 > and use ghc, I get: > > koshka:~/Desktop/TestWX doaitse$ ghc -package wx Main.hs > koshka:~/Desktop/TestWX doaitse$ /usr/local/wxhaskell/bin/macosx-=20 > app -v Main > creating resource: > > /Developer/Tools/Rez -t APPL Carbon.r -o Main > creating app directories: > - Main.app > - Main.app/Contents > - Main.app/Contents/MacOS > - Main.app/Contents/Resources > creating package info: > - Main.app/Contents/PkgInfo > done. > > koshka:~/Desktop/TestWX doaitse$ open Main > 2007-02-16 13:38:46.947 open[1770] LSOpenFromURLSpec() returned =20 > -10661 for application (null) urls file://localhost/Users/doaitse/=20 > Desktop/TestWX/Main. > koshka:~/Desktop/TestWX doaitse$ > > > Anyone any ideas? > > Doaitse > > > > > > On Oct 22, 2006, at 4:18 PM, Mads Lindstr=F8m wrote: > >> Hi all >> >> Is there anybody who has an example of using context sensitive popup >> menus? >> >> I am especially interested in an example with a listbox, where one =20= >> can >> right-click an element and get a popup menu. >> >> >> Greetings, >> >> Mads Lindstr=F8m >> >> >> >> ---------------------------------------------------------------------=20= >> ---- >> Using Tomcat but need to do more? Need to support web services, =20 >> security? >> Get stuff done quickly with pre-integrated technology to make your =20= >> job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache =20 >> Geronimo >> http://sel.as-us.falkag.net/sel?=20 >> cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642 >> _______________________________________________ >> wxhaskell-users mailing list >> wxh...@li... >> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users |