On Wed, 25 Mar 2015 22:57:12 +0100, Michael Jones <m...@proclivis.com>
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
--

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to