[wxhaskell-users] Minor build problems with wxc 0.90

2012-04-14 Thread Fabian Binz
Hello, 

first I'd like to thank you for your work on wxHaskell and especially this
release!

I just wanted to report some minor build problems I had when building
wxc-0.90 on a Windows 7 machine with GHC 7.4.1:

1. An error in Setup.hs:
Setup.hs:14:8:
Could not find module `System'
It is a member of the hidden package `haskell98-2.0.0.1'.
Use -v to see a list of the files searched for.

I could easily solve this error by importing ExitCode from System.Exit
instead of System. I'm not quite sure why this error appears though, since
the online library documentation says that System exports ExitCode...

2. The wx-config needed for wxWidgets 2.9 needs the MSVCP100D.dll, which
apparently doesn't exist in my PATH (Visual Studio 2010 is installed).
However, I could easily solve this problem by compiling wx-config from
source myself. I guess this is just some setting in VS that needs to be
changed (was it compiled in debug mode?), so that it doesn't depend on this
dll.

Apart from that, everything installed fine.

Regards, 
Fabian 


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] virtual list control

2012-04-15 Thread Fabian Binz
Hello, 

 

I need to display a quite large number of data in a list control and use the
'items' attribute for that purpose. However, I'm not content with the speed
of this solution and would like to use a 'virtual' list control instead, as
it is described here: [1]

 

The problem is, that the necessary constants and functions (i.e.
wxLC_VIRTUAL) are not defined by wxHaskell. Is there a technical reason for
this or could they be added easily?

 

Regards,

Fabian

 

 

[1]:  http://docs.wxwidgets.org/trunk/classwx_list_ctrl.html
http://docs.wxwidgets.org/trunk/classwx_list_ctrl.html 

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] virtual list control

2012-05-14 Thread Fabian Binz
Hi Jeremy, 

 

I don't know if you continued working on this, but I forked wxHaskell on
GitHub and tried to implement it myself:
https://github.com/FabianBinz/wxHaskell

 

 

For testing purposes, I only implemented the OnGetItemText and SetItemCount
method and it seems to work. 

 

 

To implement the virtual list control, I defined a new class
wxVirtualListCtrl in wxc:

https://github.com/FabianBinz/wxHaskell/blob/master/wxc/src/include/virtuall
istctrl_impl.h

 

 

Since it needs to invoke a callback function, I created the typedef
OnGetItemTextCallback. To make wxdirect accept this new type, I extended the
parser (patomtype) in ParseC.hs. This solution is very ad-hoc and I think
because wxc is supposed to be a language agnostic C wrapper, we should maybe
add another macro to wcx_types.hs (something like TCallback), which is then
recognized by wxdirect.

 

 

So, while this all works pretty well, there is unfortunately a memory leak
in Graphics.UI.WXCore.VirtualListCtrl, because of my use of newCString. At
the moment I don't know how to fix it and would be glad if someone could
give me some advice.

 

 

 

Regards,

Fabian

 

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


Re: [wxhaskell-users] problems buiding wxHaskell on Windows

2012-06-14 Thread Fabian Binz
 But I note that the wiki page for wxHaskell says to have a 
 cabal/wxc-xxx/ghcversion
I don't have that either. I thus conclude, that you don't need it and it 
doesn't seem to be the source of your problem.

 cabal install wxc
  Resolving dependencies...
  command line: cannot satisfy -package Cabal-1.10.2.0:

Which version of Cabal (note: the library, not the tool cabal-install) do you 
have installed? You can check that by running ghc-pkg list from the command 
line.
Maybe it's a problem with your package database (you can check by running 
ghc-pkg check and if it is broken you can try ghc-pkg recache).

-Ursprüngliche Nachricht-
Von: Gregory Guthrie [mailto:guth...@mum.edu] 
Gesendet: Mittwoch, 13. Juni 2012 18:25
An: Fabian Binz; wxhaskell-users@lists.sourceforge.net
Betreff: RE: [wxhaskell-users] problems buiding wxHaskell on Windows

Yes, I did just this. Using your flags all of wxWidgets compile, and all 
samples run.

But I note that the wiki page for wxHaskell says to have a 
cabal/wxc-xxx/ghcversion

On the path, but I don't have any such directory in my cabal (although I did 
set the path...).
There is a wxdirect-0.90.0.1 installed there, nothing else new of wx*.

Trying to do the cabal installs, I used the version 21 of wx-config, and still 
get these errors:

   E:\Plang\Libraries\wxWidgets2.9cabal install wxc
   Resolving dependencies...
   [1 of 1] Compiling Main ( 
C:\Users\guthrie\AppData\Local\Temp\wxc-0.
   90.0.3-11300\wxc-0.90.0.3\Setup.hs, 
C:\Users\guthrie\AppData\Local\Temp\wxc-0.90
   .0.3-11300\wxc-0.90.0.3\dist\setup\Main.o )
   Linking 
C:\Users\guthrie\AppData\Local\Temp\wxc-0.90.0.3-11300\wxc-0.90.0.3\dist\setup\setup.exe
 ...
   Configuring wxc-0.90.0.3...
   Configuring wxc to build against wxWidgets 2.9

   setup.exe: Missing dependencies on foreign libraries:
   * Missing C libraries: wxmsw29ud_all, wxmsw29ud
   This problem can usually be solved by installing the system packages that
   provide these libraries (you may need the -dev versions). If the libraries
   are already installed but in a non-standard location then you can use the
   flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
   cabal: Error: some packages failed to install:
   wxc-0.90.0.3 failed during the configure step. The exception was:
   ExitFailure 1

Using your FLAGS did help in the build of wxWidgets, now all of the samples 
compile and run.

Upgrading to version 26 of wx-config changes the errors to this:

   C:\Users\guthrie\AppData\Roaming\cabal\bincabal install wxc
   Resolving dependencies...
   command line: cannot satisfy -package Cabal-1.10.2.0:
Cabal-1.10.2.0-db589dd5d526d3111ac2fde0f9ab986c is unusable due to missing 
or recursive dependencies:
  array-0.3.0.2-8e9cd0144e87fa9cc86cc9031631c4f3 base-4.3.1.0-f520cd232cc386
   346843c4a12b63f44b containers-0.4.0.0-18deac99a132f04751d862b77aab136e 
directory
   -1.1.0.0-3a2367d72569467a8af8a231656ff1b8 
filepath-1.2.0.0-f132e9f7703da4e20a47f
   f2b9acf1ea1 old-time-1.0.0.6-445ce39cbcebd38069c25c0f383b728d 
pretty-1.0.1.2-abc
   7c632374e50e1c1927987c2651f0f 
process-1.0.1.5-b3dded8e54a2e13d22af410bdcfafff4
   (use -v for more information)
   cabal: Error: some packages failed to install:
   wxc-0.90.0.3 failed during the configure step. The exception was:
   ExitFailure 1

Trying to resolve them:
   C:\Users\guthrie\AppData\Roaming\cabal\bincabal install base
   Resolving dependencies...
   cabal: internal error: impossible

   C:\Users\guthrie\AppData\Roaming\cabal\bincabal install array
   Resolving dependencies...
   No packages to be installed. All the requested packages are already 
installed.
   If you want to reinstall anyway then use the --reinstall flag.

   C:\Users\guthrie\AppData\Roaming\cabal\bincabal install process
   Resolving dependencies...
   No packages to be installed. All the requested packages are already 
installed.
   If you want to reinstall anyway then use the --reinstall flag.

Etc...  ???
---
 -Original Message-
 From: Fabian Binz [mailto:fabianb...@yahoo.de]
 Sent: Thursday, June 07, 2012 12:37 PM
 To: wxhaskell-users@lists.sourceforge.net
 Subject: Re: [wxhaskell-users] problems buiding wxHaskell on Windows
 
  Does anyone run WxHaskell 2.9 on Windows?
 Yes.
 
  library files: gcc_mswuddll  gcc_mswudll
 It should create a wxmsw293u_gcc_custom.dll (and maybe a 
 wxmsw293u_gl_gcc_custom.dll for OpenGL support).
 
 Do you run cabal install wxc from Msys-Bash or from cmd.exe? You should use 
 the latter.
 Also, which make flags did you use? I compiled wxWidgets-2.9.3 with 
 the following command (from msys-bash):
 
 cd your-wxWidgets-2.9.3-dir/build/msw
 mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1
 
 Then, with the wx-config.exe from the wiki page in PATH, I open cmd.exe and 
 type:
 cabal install wxc
 
 I hope this helps.
 
 Regards,
 Fabian