From: Michael J. <mi...@pr...> - 2015-03-29 01:40:52
|
There is a response from wxWidgets trac #16935: http://trac.wxwidgets.org/ticket/16935#comment:1 On Mar 28, 2015, at 5:12 PM, Henk-Jan van Tuyl <hj...@ch...> wrote: > On Wed, 25 Mar 2015 22:57:12 +0100, Michael Jones <mi...@pr...> > wrote: > >> On Win 7... >> >> The latest code on github seems to result in a wxWidgets call to LPTSTR WINAPI GetCommandLine(void); >> >> This results in popping a dialog complaining about command options. On Linux this does not happen. Looks like wxWidgets is trying to use this call to deal with unicode, but it unfortunately bypasses the Haskell argument mechanism and grabs everything including +/-RTS and passes it to wxWidgets for consideration. Perhaps wxHaskell should manage the arguments and strip off any arguments that are not destined for wxWidgets, or at least let the Haskell code intercept and manage the problem. >> >> Is there some way to effect the wxHaskell initialization so that it prevents this call, so that an wxHaskell application running on Windows 7 can accept command line arguments properly? >> >> I handling initialization with a start call within Haskell. Perhaps there is an alternate approach I am unaware of. > > I am trying to change the internal representation of the command line, but it is likely to fail. The best thing would to let the wxWidgets people change the behavior of wxWidgets to let it be the same in Windows as in Linux. You could write a ticket for this[0]. To be sure this problems isn't forgotten, you should also write a wxHaskell ticket[1], preferably linking to the wxWidgets ticket. > > The message about the unexpected parameter stems from wxWidgets\src\common\cmdline.cpp , method wxCmdLineParser::Parse(bool showUsage) . Maybe it is possible to specify a wxCmdLineParser, that handles the +RTS parameters correctly, in wxHaskell. > > Regards, > Henk-Jan van Tuyl > > > [0] http://trac.wxwidgets.org/ > [1] http://sourceforge.net/p/wxhaskell/_list/tickets > > -- > Folding@home > What if you could share your unused computer power to help find a cure? In > just 5 minutes you can join the world's biggest networked computer and get > us closer sooner. Watch the video. > http://folding.stanford.edu/ > > > http://Van.Tuyl.eu/ > http://members.chello.nl/hjgtuyl/tourdemonad.html > Haskell programming > -- |