
You don't have to turn a program into an application in order to make the GUI work, you just have to make some calls to enable GUI events to be delivered to your program (or something like that, at least). I've attached a script that I got from somewhere on the internet (can't remember exactly where) that does this, so all you need to do is run "enableGUI" at the beginning of "main", rather than having to do additional packaging to make your program work. Cheers, Greg On Oct 29, 2009, at 7:08 AM, Iain Barnett wrote:
I was trying to go through some of the wxHaskell examples, and they wouldn't work on my (Tiger) mac. Same thing happened with a few other wx apps I downloaded from Hackage. A bit of a rummage on the internet turned up an issue with wxMac[1]. You need to put the haskell executable in an OSX Application Bundle or you can't get focus on the window.
Since I don't know how to use XCode (and quickly got bored of trying to find what I needed to do with it for my needs) I setup an applescript that builds a bare bones app bundle, with a basic plist file too.
This is probably something others have gone though and, just in case it might be some use to others, I stuck it here (might be a little bit of overkill using Sourceforge, but I wasn't go to pay for the download space on my blog considering I have zero cash right now).
http://sourceforge.net/projects/makebundle/
The applescript has a perl script in it too, so you'll need perl on your machine for it to work. Everything you need to know is in the readme.
Iain
[1] http://wiki.wxwidgets.org/WxMac_Issues#My_app_can.27t_be_brought_to_the_fron...
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe