You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
(34) |
Sep
(14) |
Oct
(36) |
Nov
(32) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(9) |
Mar
(31) |
Apr
(36) |
May
(17) |
Jun
(21) |
Jul
(13) |
Aug
(18) |
Sep
(2) |
Oct
(10) |
Nov
(18) |
Dec
(28) |
2005 |
Jan
(26) |
Feb
(15) |
Mar
(26) |
Apr
(11) |
May
(60) |
Jun
(3) |
Jul
(12) |
Aug
(4) |
Sep
(12) |
Oct
(19) |
Nov
(36) |
Dec
(10) |
2006 |
Jan
(6) |
Feb
(13) |
Mar
(6) |
Apr
(2) |
May
(9) |
Jun
(3) |
Jul
(6) |
Aug
(13) |
Sep
(1) |
Oct
(24) |
Nov
(33) |
Dec
(47) |
2007 |
Jan
(21) |
Feb
(41) |
Mar
(17) |
Apr
(9) |
May
(4) |
Jun
(20) |
Jul
(24) |
Aug
(71) |
Sep
(35) |
Oct
(10) |
Nov
(39) |
Dec
(39) |
2008 |
Jan
(24) |
Feb
(42) |
Mar
(61) |
Apr
(12) |
May
(11) |
Jun
(4) |
Jul
(9) |
Aug
(6) |
Sep
(6) |
Oct
(4) |
Nov
(3) |
Dec
(14) |
2009 |
Jan
(25) |
Feb
(18) |
Mar
(19) |
Apr
(24) |
May
(14) |
Jun
(7) |
Jul
(14) |
Aug
(25) |
Sep
(40) |
Oct
(20) |
Nov
(22) |
Dec
(4) |
2010 |
Jan
(55) |
Feb
(11) |
Mar
(9) |
Apr
(10) |
May
(10) |
Jun
(9) |
Jul
(7) |
Aug
(4) |
Sep
(15) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
(4) |
Apr
(6) |
May
(20) |
Jun
(30) |
Jul
(15) |
Aug
(4) |
Sep
(23) |
Oct
(24) |
Nov
(3) |
Dec
(8) |
2012 |
Jan
(23) |
Feb
(7) |
Mar
(19) |
Apr
(48) |
May
(8) |
Jun
(27) |
Jul
(10) |
Aug
(1) |
Sep
(11) |
Oct
(1) |
Nov
|
Dec
(3) |
2013 |
Jan
(1) |
Feb
|
Mar
(17) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(14) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
(2) |
Dec
(1) |
2016 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gour <go...@go...> - 2010-01-20 06:40:17
|
Hiya! Haskell noob considering to write desktop gui app by developing on Linux... Moreover, I'd like the application to be multi-platform and to be nicely supported on Mac OS X and finally (the least priority) on Windows. For long time I was considering gtk2hs (yeah, I'm 'learning' Haskell too long), but recently one of the important targets for the app switched from Windows to Mac, and now I'm considering wxhaskell as well... Now, based on what I know so far wxhaskell may be better supported on Mac since GTK+ port is not finished. otoh, I'm a bit concerned about "Since the core interface is generated automatically from the wxEiffel binding..." and visiting the project show the status notice: "The 0.7 release will probably be the last official release. The project lost its core developer following the 0.7 release in late June 2003 and it is unlikely that anyone will be able to take on this vital role. " So, my question is if this dependency on wxEiffel will change soon, especially considering the upcoming wx-3.0 release? Another concern is question of memory management touched upon in the following article: http://haskell.org/gtk2hs/archives/2005/07/15/automatic-memory-management/ So, can someone share some thoughts about gtk2hs vs. wxhaskell with the reference to ease of use, learning curve etc. for a noob not being too familiar with none of the toolkits and considering suitability for multi-platform development in Haskell for (priority order) Linux, Mac and Windows? I've noticed that wxhaskell is improving ease of install (I'm arch user) - http://archhaskell.wordpress.com/2010/01/18/wxhaskell-packaged-for-arch/ and it may be that more devs are actively working on it atm. Otoh, wx toolkit is often not very much likened (upon mentioning it), at least, on Linux platform where people recommend Qt and GTK+ (in general, I prefer GTK+ look over Qt which I do not consider as option). Why is it so? Sincerely, Gour p.s. I've sent post directly to the list, but it was held for moderator's approval despite of being subscribed? -- Gour | Hlapicina, Croatia | GPG key: F96FF5F6 ---------------------------------------------------------------- |
From: Gour <go...@go...> - 2010-01-19 09:59:16
|
Hiya! Haskell noob considering to write desktop gui app by developing on Linux... Moreover, I'd like the application to be multi-platform and to be nicely supported on Mac OS X and finally (the least priority) on Windows. For long time I was considering gtk2hs (yeah, I'm 'learning' Haskell too long), but recently one of the important targets for the app switched from Windows to Mac, and now I'm considering wxhaskell as well... Now, based on what I know so far wxhaskell may be better supported on Mac since GTK+ port is not finished. otoh, I'm a bit concerned about "Since the core interface is generated automatically from the wxEiffel binding..." and visiting the project show the status notice: "The 0.7 release will probably be the last official release. The project lost its core developer following the 0.7 release in late June 2003 and it is unlikely that anyone will be able to take on this vital role. " So, my question is if this dependency on wxEiffel will change soon, especially considering the upcoming wx-3.0 release? Another concern is question of memory management touched upon in the following article: http://haskell.org/gtk2hs/archives/2005/07/15/automatic-memory-management/ So, can someone share some thoughts about gtk2hs vs. wxhaskell with the reference to ease of use, learning curve etc. for a noob not being too familiar with none of the toolkits and considering suitability for multi-platform development in Haskell for (priority order) Linux, Mac and Windows? I've noticed that wxhaskell is improving ease of install (I'm arch user) - http://archhaskell.wordpress.com/2010/01/18/wxhaskell-packaged-for-arch/ and it may be that more devs are actively working on it atm. Otoh, wx toolkit is often not very much likened (upon mentioning it), at least, on Linux platform where people recommend Qt and GTK+ (in general, I prefer GTK+ look over Qt which I do not consider as option). Why is it so? Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: F96FF5F6 ---------------------------------------------------------------- |
From: Rodrigo G. <rod...@gm...> - 2010-01-15 14:01:13
|
Hi Jeremy! It´s a very nice Idea! Could you put a tutorial on how to install wxhaskell on different operating systems? I´ve tried to install it on ubuntu 9.10 and I got some compilation errors due to the installation process can´t find the wxdirect executable... Regards Rodrigo On Mon, Jan 11, 2010 at 9:54 AM, Jeremy O'Donoghue < jer...@gm...> wrote: > Hi all, > > I have just started a new blog at http://wewantarock.wordpress.com. > > At least initially, my intention is to provide a set of 'tutorial' > style articles to help new wxHaskell users get beyond the 'Hello > World' stage by offering a few worked examples on things you might > want to do to put together a usable application. The idea is to offer > something which fits between the first tutorial and the reference > documents. > > The first few postings will explain the anatomy of a complete custom > wxHaskell control written in Haskell. > > Comments gratefully accepted, including (gentle please - I'm not > dons!) criticism of my Haskell style. > > Regards > Jeremy O'Donoghue > _______________________________________________ > Haskell-Cafe mailing list > Has...@ha... > http://www.haskell.org/mailman/listinfo/haskell-cafe > |
From: Henk-Jan v. T. <hj...@ch...> - 2010-01-14 23:59:57
|
On Thu, 14 Jan 2010 01:15:31 +0100, David Streader <ds...@cs...> wrote: > So far I love wxHaskell when I stay safely within by simple > understanding. > But as soon as I step out side of my limited knowledge I am totally > lost. > So *Question one*: What is the best source of documentation? > An example - I have successfully used grids to generate layout for a > frame/ dialog. But I need to know the name of a grid so that I can > later set some of its attributes (add rows cols, ....). The only > commands I have found (in example code) to do this are > > g <- gridCreate parent id rect flags > gridCreateGrid g 0 0 0 > > But I have failed to find and documentation for gridCreate or > gridCreateGrid where should I look. > > *Question two*: Would it be better to use the wxWidgets documentation? > if so is there any documented way to translate wxWidgets method calls > into Haskell? wxWidgets doumentation can be useful, but wxWidgets doesn't have a simple one to one relationship with wxHaskell. The following link points to a description of wxGrid::CreateGrid: http://docs.wxwidgets.org/trunk/classwx_grid.html#0a3c0ccf91753666e40dd117ccc84637 Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://functor.bamikanarie.com http://members.chello.nl/hjgtuyl/tourdemonad.html -- |
From: David S. <ds...@cs...> - 2010-01-14 02:03:39
|
So far I love wxHaskell when I stay safely within by simple understanding. But as soon as I step out side of my limited knowledge I am totally lost. So *Question one*: What is the best source of documentation? An example - I have successfully used grids to generate layout for a frame/ dialog. But I need to know the name of a grid so that I can later set some of its attributes (add rows cols, ....). The only commands I have found (in example code) to do this are g <- gridCreate parent id rect flags gridCreateGrid g 0 0 0 But I have failed to find and documentation for gridCreate or gridCreateGrid where should I look. *Question two*: Would it be better to use the wxWidgets documentation? if so is there any documented way to translate wxWidgets method calls into Haskell? Many thanks in advance david streader |
From: Fernando B. <gre...@gm...> - 2010-01-12 11:58:01
|
Mark: That's maybe because in your BlobboControls.hs your are using import BlobboControls where ... instead of module BlobboControls where ... Hope this helps :) On Jan 12, 2010, at 7:18 AM, wxh...@li... wrote: > From: Mark Norrish <u45...@an...> > Date: January 12, 2010 5:13:52 AM GMT-03:00 > To: wxh...@li... > Subject: [wxhaskell-users] Importing modules > > > Hello, > I'm trying to write a script with wxHaskell involving modules, but > GHC doesn't seem able to find them. My program has a main module, > Main.hs: > > module Main where > import Graphics.UI.WX > import BlobboControls -- Blobbo is a circle one can move around the > screen > functions... > > and BlobboControls.hs containing > > import BlobboControls where > import Graphics.UI.WX > more functions... > > and when I try to compile it, I get > > mark@mark-laptop:~/MyCode/Blobbo$ ghc -v -package wx -o main Main.hs > Glasgow Haskell Compiler, Version 6.10.4, for Haskell 98, stage 2 > booted by GHC version 6.10.4 > Using package config file: /usr/lib/ghc-6.10.4/./package.conf > Using package config file: /home/mark/.ghc/i386-linux-6.10.4/ > package.conf > hiding package base-3.0.3.1 to avoid conflict with later version > base-4.1.0.0 > wired-in package ghc-prim mapped to ghc-prim-0.1.0.0 > wired-in package integer mapped to integer-0.1.0.1 > wired-in package base mapped to base-4.1.0.0 > wired-in package rts mapped to rts-1.0 > wired-in package haskell98 mapped to haskell98-1.0.1.0 > wired-in package syb mapped to syb-0.1.0.1 > wired-in package template-haskell mapped to template-haskell-2.3.0.1 > wired-in package dph-seq[""] not found. > wired-in package dph-par[""] not found. > Hsc static flags: -static > Created temporary directory: /tmp/ghc5654_0 > *** Checking old interface for main:Main: > *** Parser: > *** Renamer/typechecker: > > Main.hs:3:0: > Failed to load interface for `BlobboControls': > locations searched: > BlobboControls.hi > BlobboControls.hi-boot > *** Deleting temp files: > Deleting: /tmp/ghc5654_0/ghc5654_0.s > Warning: deleting non-existent /tmp/ghc5654_0/ghc5654_0.s > *** Deleting temp dirs: > Deleting: /tmp/ghc5654_0 > > Does anyone know why GHC could not BlobboControls.hs, or the module > in the .hi files? > Thank you for your time, > Mark Norrish > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev ______________ |
From: Andy G. <ha...@gi...> - 2010-01-12 11:18:17
|
If you want ghc to chase dependencies when building an executable, pass it the --make flag, ie try: > ghc --make -v -package wx -o main Main.hs I think this will give you what you need - though I'm assuming those .hi files don't exist, ie you haven't compiled them separately and not told us. :-) Personally, I always build via cabal these days. More info in section 2.4 of: http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program Hope this helps, -Andy On 12 Jan 2010, at 08:13, Mark Norrish wrote: > Hello, > I'm trying to write a script with wxHaskell involving modules, but > GHC doesn't seem able to find them. My program has a main module, > Main.hs: > > module Main where > import Graphics.UI.WX > import BlobboControls -- Blobbo is a circle one can move around the > screen > functions... > > and BlobboControls.hs containing > > import BlobboControls where > import Graphics.UI.WX > more functions... > > and when I try to compile it, I get > > mark@mark-laptop:~/MyCode/Blobbo$ ghc -v -package wx -o main Main.hs [snip] > Main.hs:3:0: > Failed to load interface for `BlobboControls': > locations searched: > BlobboControls.hi > BlobboControls.hi-boot > *** Deleting temp files: > Deleting: /tmp/ghc5654_0/ghc5654_0.s > Warning: deleting non-existent /tmp/ghc5654_0/ghc5654_0.s > *** Deleting temp dirs: > Deleting: /tmp/ghc5654_0 > > Does anyone know why GHC could not BlobboControls.hs, or the module > in the .hi files? -- Andy Gimblett http://gimbo.org.uk/ |
From: Malcolm W. <Mal...@cs...> - 2010-01-12 11:18:07
|
> mark@mark-laptop:~/MyCode/Blobbo$ ghc -v -package wx -o main Main.hs > Main.hs:3:0: > Failed to load interface for `BlobboControls': > locations searched: > BlobboControls.hi > BlobboControls.hi-boot You omitted the --make argument to ghc, so it is compiling only Main.hs, not the other modules. Regards, Malcolm |
From: Mark N. <u45...@an...> - 2010-01-12 08:14:06
|
Hello, I'm trying to write a script with wxHaskell involving modules, but GHC doesn't seem able to find them. My program has a main module, Main.hs: module Main where import Graphics.UI.WX import BlobboControls -- Blobbo is a circle one can move around the screen functions... and BlobboControls.hs containing import BlobboControls where import Graphics.UI.WX more functions... and when I try to compile it, I get mark@mark-laptop:~/MyCode/Blobbo$ ghc -v -package wx -o main Main.hs Glasgow Haskell Compiler, Version 6.10.4, for Haskell 98, stage 2 booted by GHC version 6.10.4 Using package config file: /usr/lib/ghc-6.10.4/./package.conf Using package config file: /home/mark/.ghc/i386-linux-6.10.4/package.conf hiding package base-3.0.3.1 to avoid conflict with later version base-4.1.0.0 wired-in package ghc-prim mapped to ghc-prim-0.1.0.0 wired-in package integer mapped to integer-0.1.0.1 wired-in package base mapped to base-4.1.0.0 wired-in package rts mapped to rts-1.0 wired-in package haskell98 mapped to haskell98-1.0.1.0 wired-in package syb mapped to syb-0.1.0.1 wired-in package template-haskell mapped to template-haskell-2.3.0.1 wired-in package dph-seq[""] not found. wired-in package dph-par[""] not found. Hsc static flags: -static Created temporary directory: /tmp/ghc5654_0 *** Checking old interface for main:Main: *** Parser: *** Renamer/typechecker: Main.hs:3:0: Failed to load interface for `BlobboControls': locations searched: BlobboControls.hi BlobboControls.hi-boot *** Deleting temp files: Deleting: /tmp/ghc5654_0/ghc5654_0.s Warning: deleting non-existent /tmp/ghc5654_0/ghc5654_0.s *** Deleting temp dirs: Deleting: /tmp/ghc5654_0 Does anyone know why GHC could not BlobboControls.hs, or the module in the .hi files? Thank you for your time, Mark Norrish |
From: Jeremy O'D. <jer...@gm...> - 2010-01-11 11:54:33
|
Hi all, I have just started a new blog at http://wewantarock.wordpress.com. At least initially, my intention is to provide a set of 'tutorial' style articles to help new wxHaskell users get beyond the 'Hello World' stage by offering a few worked examples on things you might want to do to put together a usable application. The idea is to offer something which fits between the first tutorial and the reference documents. The first few postings will explain the anatomy of a complete custom wxHaskell control written in Haskell. Comments gratefully accepted, including (gentle please - I'm not dons!) criticism of my Haskell style. Regards Jeremy O'Donoghue |
From: Mark N. <u45...@an...> - 2010-01-11 09:37:53
|
Hello all, Thanks a bunch for the help. It's working now. Cheers, Mark Norrish > Hello, ----------------------------------------------------------- | > I'm trying to learn how to use wxHaskell and I want to try drawing some simple objects. However, functions like circle require a (DC a) argument, and I don't know how to make a DC so I can't get anything to work. Does anyone have, say, a list of examples of how to make a (DC a)? > Thanks, > Mark Norrish > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... https://lists.sourceforge.net/lists/listinfo/wxhaskell-users | ----------------------------------------------------------- |
From: Bernd H. <ber...@ic...> - 2010-01-10 16:23:20
|
Hi Mark, a DC instance is provided by the paint event. Thus you can write something like the following: let drawScene dc _ = do ... drawingPanel <- panel p [on paint := drawScene] Best Regards, Bernd > Hello, > I'm trying to learn how to use wxHaskell and I want to try drawing > some simple objects. However, functions like circle require a (DC a) > argument, and I don't know how to make a DC so I can't get anything to > work. Does anyone have, say, a list of examples of how to make a (DC a)? > Thanks, > Mark Norrish > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > > > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > |
From: Pedro M. <ped...@gm...> - 2010-01-10 00:56:12
|
Hello, You have access to a DC when within a handler where you're supposed to draw. For instance, for the event paint: *paint* :: Paint <Graphics-UI-WX-Events.html#t%3APaint> w => Event<Graphics-UI-WX-Events.html#t%3AEvent> w (DC <Graphics-UI-WXCore-WxcClassTypes.html#t%3ADC> () -> Rect<Graphics-UI-WXCore-WxcTypes.html#t%3ARect> -> IO<http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3AIO> ()) The handler that you're supposed to provide is of type (DC<Graphics-UI-WXCore-WxcClassTypes.html#t%3ADC> () -> Rect <Graphics-UI-WXCore-WxcTypes.html#t%3ARect> -> IO<http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3AIO> ()) so when that handler gets called, a DC is passed in as an argument (so you just need to define a handler function that uses it). I suggest you see the example Paint.hs in the samples/wx folder of a source distribution: http://code.haskell.org/wxhaskell/samples/wx/Paint.hs Hope that helped. Regards, Pedro On Fri, Jan 8, 2010 at 9:45 AM, Mark Norrish <u45...@an...> wrote: > Hello, > I'm trying to learn how to use wxHaskell and I want to try drawing some > simple objects. However, functions like circle require a (DC a) argument, > and I don't know how to make a DC so I can't get anything to work. Does > anyone have, say, a list of examples of how to make a (DC a)? > Thanks, > Mark Norrish > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |
From: Mark N. <u45...@an...> - 2010-01-08 09:45:56
|
Hello, I'm trying to learn how to use wxHaskell and I want to try drawing some simple objects. However, functions like circle require a (DC a) argument, and I don't know how to make a DC so I can't get anything to work. Does anyone have, say, a list of examples of how to make a (DC a)? Thanks, Mark Norrish |
From: Jeremy O'D. <jer...@gm...> - 2010-01-04 11:56:55
|
Hi Carlos, Sorry for the delay in replying - family takes priority over the Christmas period. I think I understand what you are looking for. The key, I think (and I must admit that I have always found Layout to be a little confusing - it probably deserves more investigation and better documentation), is to understand that using layout makes a strong effort to make all widgets appear on the controlled window without any need for scrolling. I performed many experiments, and whenever the Frame in the code below is given a Layout, the size of the ScrolledWindow is expanded to be large enough to fit all widgets. I haven't yet determined whether this is a bug or designed behaviour, but it is not what I expected. The example below is closer to what you want - although I should note that setting the ScrolledWindow style to force vertical and horizontal scroll bars doesn't seem to have any effect - you only get the scroll bars you need. In the example, instead of doing something like: set f [layout := container pnl $ column 5 [.... I instead perform the layout in the ScrolledWindow, taking care to set the clientSize to the size I need the ScrolledWindow to take up (this is critical). I then call windowReLayoutMinimal f, which causes the Frame to be fitted to the smallest size required to contain the child window (i.e. pnl - in this case 100 x 100). Hope this helps. Best regards Jeremy module Main where import Data.Bits import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] pnl <- scrolledWindow f [ scrollRate := sz 20 20 ] sal1 <- staticText pnl [ text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?" ] sal2 <- staticText pnl [ text := "staticText2" ] sal3 <- staticText pnl [ text := "staticText3" ] sal4 <- staticText pnl [ text := "staticText4" ] sal5 <- staticText pnl [ text := "staticText5" ] sal6 <- staticText pnl [ text := "staticText6" ] set pnl [ layout := column 5 [ widget sal1, widget sal2, widget sal3, widget sal4, widget sal5, widget sal6], clientSize := sz 100 100, style := wxHSCROLL .|. wxVSCROLL] windowReLayoutMinimal f return () On Fri, 25 Dec 2009 23:15 -0400, "carlos gomez" <car...@gm...> wrote: The example you put is good, but it is not what I want. I want to use the scroll bar of a window (like panel or scrolledwindow), and move the scroll bar to see the parts not visible of elements that can contain the panel. In your example, every textCtrl could have his own scroll bar, but I want only one for all elements, and it have to be in the panel container of the elements. As I read in wxwidget, an easy and automatic way to configure the scroll bar in a scrolledWindow is using scrollRate. Then the scrolledWindow will use the Sizer (Layout in wxHaskell) to set the virtualSize and the clientSize of the panel to set the pageSize of the scrolledWindow. I wrote an example in wxwidget, and the same example in wxhaskell didn't work. I wonder why didn't work and how can i fix. ----------------------------------------------------------- #include <wx/wx.h> #include <wx/wxhtml.h> #include <wx/scrolwin.h> class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { public: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame( _("Hello World"), wxPoint(50, 50), wxSize(450, 340) ); frame->Show(true); SetTopWindow(frame); return true; } MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame(NULL, -1, title, pos, size) { wxScrolledWindow* scrolledWindow = new wxScrolledWindow ( this, wxID_ANY, wxPoint (0, 0), wxSize (400, 400), wxVSCROLL | wxHSCROLL); //scrolledWindow->SetScrollbars(20, 20, 200, 200); scrolledWindow->SetScrollRate(10, 10); wxStaticText* staticText1 = new wxStaticText( scrolledWindow, wxID_STATIC, wxT("This is an example to verify the functionality of scrolledWindow in wxwidget, so let's go to see what's going on!!!!."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxStaticText* staticText2 = new wxStaticText( scrolledWindow, wxID_STATIC, wxT("staticText 2."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxBoxSizer *topSizerSW = new wxBoxSizer (wxVERTICAL); topSizerSW->Add(staticText1, 1, wxEXPAND | wxALL, 10); topSizerSW->Add(staticText2, 1, wxEXPAND | wxALL, 10); scrolledWindow->SetSizer(topSizerSW); } --------------------------------------------------------- --------------------------------------------------------- module Main where import Graphics.UI.WXCore import Graphics.UI.WX import Data.Bits main :: IO() main = start gui gui :: IO() gui = do f <- frame [text := "Frame"] sw <- scrolledWindow f [ scrollRate := sz 10 10 , style := wxVSCROLL .|. wxHSCROLL ] st1 <- staticText sw [text := "This is an example to verify the functionality of scrolledWindow in wxwidget, so let's go to see what's going on!!!!."] st2 <- staticText sw [text := "staticText 2."] set sw [layout := column 5 [ expand $ widget st1 , expand $ widget st2 ] ] set f [layout := fill $ widget sw] return () --------------------------------------------------------- 2009/12/23 Jeremy O'Donoghue <[1]jer...@gm...> Hi Carlos, I assume from the posted code that what you really want is a StaticText widget with a scroll bar, and that you wish to 'force' the scroll bar to be present at all times (default behaviour of all widgets is that scroll bars appear only when they are needed). The code I have just tested to do this is: module Main where import Data.Bits import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] tcl <- textCtrl f [text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?", style := wxTE_READONLY .|. wxHSCROLL .|. wxVSCROLL] set f [layout := fill $ widget tcl, clientSize := sz 200 200] return () Compared to your code, there are a few differences: It is sufficient, for simple cases, to simply set the wxHSCROLL and/or wxVSCROLL style on most windows if you want them to have permanent scroll bars. The wxTE_READONLY style replicates a StaticText (i.e. it sets text control to be read only) but with multiple lines. If you just want a single line, StaticText can be used instead. You should set a clientSize on the parent frame - if you do not, all widgets will be fittedt to their minimum possible size. The use of the fill combinator in the layout indicates that I want the TextCtrl to fit the whole of the allocated space. Hope this helps. Best regards Jeremy On Tue, 22 Dec 2009 20:41 -0400, "carlos gomez" <[2]car...@gm...> wrote: Hi all I am trying to use scrolled windows with wxhaskell, but it doesn't work, Am I doing rightly? here is the code: ---------------------------------------------------- module Gui where import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] pnl <- scrolledWindow f [scrollRate := sz 20 20] sal <- staticText pnl [text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?"] set pnl [layout := widget sal] set f [layout := column 5 [widget pnl]] return () ---------------------------------------------------- --carlos -- Jeremy O'Donoghue [3]jer...@gm... References 1. mailto:jer...@gm... 2. mailto:car...@gm... 3. mailto:jer...@gm... -- Jeremy O'Donoghue jer...@gm... |
From: carlos g. <car...@gm...> - 2009-12-26 03:15:30
|
The example you put is good, but it is not what I want. I want to use the scroll bar of a window (like panel or scrolledwindow), and move the scroll bar to see the parts not visible of elements that can contain the panel. In your example, every textCtrl could have his own scroll bar, but I want only one for all elements, and it have to be in the panel container of the elements. As I read in wxwidget, an easy and automatic way to configure the scroll bar in a scrolledWindow is using scrollRate. Then the scrolledWindow will use the Sizer (Layout in wxHaskell) to set the virtualSize and the clientSize of the panel to set the pageSize of the scrolledWindow. I wrote an example in wxwidget, and the same example in wxhaskell didn't work. I wonder why didn't work and how can i fix. ----------------------------------------------------------- #include <wx/wx.h> #include <wx/wxhtml.h> #include <wx/scrolwin.h> class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { public: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame( _("Hello World"), wxPoint(50, 50), wxSize(450, 340) ); frame->Show(true); SetTopWindow(frame); return true; } MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame(NULL, -1, title, pos, size) { wxScrolledWindow* scrolledWindow = new wxScrolledWindow ( this, wxID_ANY, wxPoint (0, 0), wxSize (400, 400), wxVSCROLL | wxHSCROLL); //scrolledWindow->SetScrollbars(20, 20, 200, 200); scrolledWindow->SetScrollRate(10, 10); wxStaticText* staticText1 = new wxStaticText( scrolledWindow, wxID_STATIC, wxT("This is an example to verify the functionality of scrolledWindow in wxwidget, so let's go to see what's going on!!!!."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxStaticText* staticText2 = new wxStaticText( scrolledWindow, wxID_STATIC, wxT("staticText 2."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxBoxSizer *topSizerSW = new wxBoxSizer (wxVERTICAL); topSizerSW->Add(staticText1, 1, wxEXPAND | wxALL, 10); topSizerSW->Add(staticText2, 1, wxEXPAND | wxALL, 10); scrolledWindow->SetSizer(topSizerSW); } --------------------------------------------------------- --------------------------------------------------------- module Main where import Graphics.UI.WXCore import Graphics.UI.WX import Data.Bits main :: IO() main = start gui gui :: IO() gui = do f <- frame [text := "Frame"] sw <- scrolledWindow f [ scrollRate := sz 10 10 , style := wxVSCROLL .|. wxHSCROLL ] st1 <- staticText sw [text := "This is an example to verify the functionality of scrolledWindow in wxwidget, so let's go to see what's going on!!!!."] st2 <- staticText sw [text := "staticText 2."] set sw [layout := column 5 [ expand $ widget st1 , expand $ widget st2 ] ] set f [layout := fill $ widget sw] return () --------------------------------------------------------- 2009/12/23 Jeremy O'Donoghue <jer...@gm...> > Hi Carlos, > > I assume from the posted code that what you really want is a StaticText > widget with a scroll bar, and that you wish to 'force' the scroll bar to be > present at all times (default behaviour of all widgets is that scroll bars > appear only when they are needed). > > The code I have just tested to do this is: > > module Main where > > import Data.Bits > > import Graphics.UI.WXCore > import Graphics.UI.WX > > main :: IO () > main = start gui > > gui :: IO () > gui = do f <- frame [text := "Frame"] > tcl <- textCtrl f [text := "This is an example of using an scroll > bar with wxhaskell, it looks like don't work, so it's true?", > style := wxTE_READONLY .|. wxHSCROLL .|. > wxVSCROLL] > set f [layout := fill $ widget tcl, clientSize := sz 200 200] > return () > > Compared to your code, there are a few differences: > > It is sufficient, for simple cases, to simply set the wxHSCROLL and/or > wxVSCROLL style on most windows if you want them to have permanent scroll > bars. The wxTE_READONLY style replicates a StaticText (i.e. it sets text > control to be read only) but with multiple lines. If you just want a single > line, StaticText can be used instead. > > You should set a clientSize on the parent frame - if you do not, all > widgets will be fittedt to their minimum possible size. The use of the fill > combinator in the layout indicates that I want the TextCtrl to fit the whole > of the allocated space. > > Hope this helps. > > Best regards > Jeremy > > On Tue, 22 Dec 2009 20:41 -0400, "carlos gomez" <car...@gm...> > wrote: > > Hi all > > I am trying to use scrolled windows with wxhaskell, but it doesn't work, > > Am I doing rightly? > > here is the code: > ---------------------------------------------------- > module Gui where > > import Graphics.UI.WXCore > import Graphics.UI.WX > > main :: IO () > main = start gui > > gui :: IO () > gui = do f <- frame [text := "Frame"] > pnl <- scrolledWindow f [scrollRate := sz 20 20] > sal <- staticText pnl [text := "This is an example of using an > scroll bar with wxhaskell, it looks like don't work, so it's true?"] > set pnl [layout := widget sal] > set f [layout := column 5 [widget pnl]] > return () > ---------------------------------------------------- > > --carlos > > -- > Jeremy O'Donoghue > jer...@gm... > > |
From: Jeremy O'D. <jer...@gm...> - 2009-12-23 16:35:09
|
Hi Carlos, I assume from the posted code that what you really want is a StaticText widget with a scroll bar, and that you wish to 'force' the scroll bar to be present at all times (default behaviour of all widgets is that scroll bars appear only when they are needed). The code I have just tested to do this is: module Main where import Data.Bits import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] tcl <- textCtrl f [text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?", style := wxTE_READONLY .|. wxHSCROLL .|. wxVSCROLL] set f [layout := fill $ widget tcl, clientSize := sz 200 200] return () Compared to your code, there are a few differences: It is sufficient, for simple cases, to simply set the wxHSCROLL and/or wxVSCROLL style on most windows if you want them to have permanent scroll bars. The wxTE_READONLY style replicates a StaticText (i.e. it sets text control to be read only) but with multiple lines. If you just want a single line, StaticText can be used instead. You should set a clientSize on the parent frame - if you do not, all widgets will be fittedt to their minimum possible size. The use of the fill combinator in the layout indicates that I want the TextCtrl to fit the whole of the allocated space. Hope this helps. Best regards Jeremy On Tue, 22 Dec 2009 20:41 -0400, "carlos gomez" <car...@gm...> wrote: Hi all I am trying to use scrolled windows with wxhaskell, but it doesn't work, Am I doing rightly? here is the code: ---------------------------------------------------- module Gui where import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] pnl <- scrolledWindow f [scrollRate := sz 20 20] sal <- staticText pnl [text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?"] set pnl [layout := widget sal] set f [layout := column 5 [widget pnl]] return () ---------------------------------------------------- --carlos -- Jeremy O'Donoghue jer...@gm... |
From: carlos g. <car...@gm...> - 2009-12-23 00:41:21
|
Hi all I am trying to use scrolled windows with wxhaskell, but it doesn't work, Am I doing rightly? here is the code: ---------------------------------------------------- module Gui where import Graphics.UI.WXCore import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Frame"] pnl <- scrolledWindow f [scrollRate := sz 20 20] sal <- staticText pnl [text := "This is an example of using an scroll bar with wxhaskell, it looks like don't work, so it's true?"] set pnl [layout := widget sal] set f [layout := column 5 [widget pnl]] return () ---------------------------------------------------- --carlos |
From: Jeremy O'D. <jer...@gm...> - 2009-12-01 13:17:45
|
This sounds as though it may be 'homework', so hints only - your professor may well be reading in any case. Please see http://www.haskell.org/haskellwiki/Homework_help for more information. - To make something happen when you press a button, you need to add an event handler to the button. - One way of doing this in wxHaskell is to reference the event handler in the button attributes when you create it. - Your event handler needs to be able to identify the text label so that it can update it with new contents. Almost all functions in wxHaskell run in the IO monad, as you have observed. While you cannot 'take away' the IO, you can use values which are embedded with an IO type, for example, suppose you have a function (these are deliberately not quite the same as the 'real' wxHaskell functions, but should give you an idea): button :: Window -> [Attribute] -> IO Button frame :: Maybe Window -> [Attribute] -> IO Frame You can create a button in a frame with code something like the following: main () = do f <- frame Nothing [Title "My Frame"] b <- button f [Text "Press Me", Event evtHandler] Notice that 'f' and 'b' give access to the frame and button information. They can do this because everything inside the 'do' is already in the IO monad. Now, in wxHaskell, the functions you will need to use are a little different, but the principles are very similar. In particular, there is a function, 'set' which may be helpful to you for some of the task. It is described in more detail at: http://wxhaskell.sourceforge.net/doc/Graphics-UI-WX-Attributes.html#v%3Aget I'll be happy to help with more specific questions, but in such case I think you should post what you have, and please bear in mind that I'll try to help you to find the correct answer yourself. Regards Jeremy On Mon, 30 Nov 2009 16:35 +0100, "Henk-Jan van Tuyl" <hj...@ch...> wrote: > > The solution is described in the page: > http://www.haskell.org/haskellwiki/How_to_get_rid_of_IO > > You can find answers to many questions on the haskell site by typing > keywords in the search field in the upper left corner; however, words of > three letters or less are not indexed, so you will need Google for this. > Use a search string like: > IO site:haskell.org/haskellwiki > to find pages about IO > > On Fri, 27 Nov 2009 20:08:44 +0100, <min...@ya...> wrote: > > > Hi! > > I am new to haskell and I would like to do a seemingly very simple task > > in it(using wxhaskell). > > I would like to change properties based on data acquired from the > > outside world(i.e real time, typed text etc.). Probably it sounds stupid > > but I simpy cannot do this for days. I am very confused and it is > > annoying how a simple task as this is so difficult. > > Here are what I tried to do: > > > > Given a text label and a button, Evry time I press the button I'd like > > to read a system dependent time data(for example getCPUTtime) and write > > it back on the label. > > > > Given a text label and a timer. Evry time the timer condition fires i'd > > like to read a system dependent time data...(like above) and write it > > back > > > > I couldn't do any of these. Mostly because if acquire any data it comes > > in the form of IO <sometype> and set doesn't accept IO type. So I cannot > > set the new value. > > I coouldn't find any function in the wxhaskell documentation or > > tutorials that sets anything based on IO types. > > I also found a function unsafePerformIO which could convert an IO to a > > non IO type but I couldn't do it anyway. I almost did the second task > > but the label didn't refresh by itself. It only refreshed itself when I > > moved the window along or continually resized it. > > > > Can anybody help me? Ther must be some way to do these things. They > > cannot be impossible because they are very basic tasks. > > > -- > Met vriendelijke groet, > Henk-Jan van Tuyl > > > -- > http://Van.Tuyl.eu/ > http://functor.bamikanarie.com > http://members.chello.nl/hjgtuyl/tourdemonad.html > -- > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users -- Jeremy O'Donoghue jer...@gm... |
From: Henk-Jan v. T. <hj...@ch...> - 2009-11-30 15:35:39
|
The solution is described in the page: http://www.haskell.org/haskellwiki/How_to_get_rid_of_IO You can find answers to many questions on the haskell site by typing keywords in the search field in the upper left corner; however, words of three letters or less are not indexed, so you will need Google for this. Use a search string like: IO site:haskell.org/haskellwiki to find pages about IO Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html -- On Fri, 27 Nov 2009 20:08:44 +0100, <min...@ya...> wrote: > Hi! > I am new to haskell and I would like to do a seemingly very simple task > in it(using wxhaskell). > I would like to change properties based on data acquired from the > outside world(i.e real time, typed text etc.). Probably it sounds stupid > but I simpy cannot do this for days. I am very confused and it is > annoying how a simple task as this is so difficult. > Here are what I tried to do: > > Given a text label and a button, Evry time I press the button I'd like > to read a system dependent time data(for example getCPUTtime) and write > it back on the label. > > Given a text label and a timer. Evry time the timer condition fires i'd > like to read a system dependent time data...(like above) and write it > back > > I couldn't do any of these. Mostly because if acquire any data it comes > in the form of IO <sometype> and set doesn't accept IO type. So I cannot > set the new value. > I coouldn't find any function in the wxhaskell documentation or > tutorials that sets anything based on IO types. > I also found a function unsafePerformIO which could convert an IO to a > non IO type but I couldn't do it anyway. I almost did the second task > but the label didn't refresh by itself. It only refreshed itself when I > moved the window along or continually resized it. > > Can anybody help me? Ther must be some way to do these things. They > cannot be impossible because they are very basic tasks. -- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://functor.bamikanarie.com http://members.chello.nl/hjgtuyl/tourdemonad.html -- |
From: <min...@ya...> - 2009-11-27 19:08:56
|
Hi! I am new to haskell and I would like to do a seemingly very simple task in it(using wxhaskell). I would like to change properties based on data acquired from the outside world(i.e real time, typed text etc.). Probably it sounds stupid but I simpy cannot do this for days. I am very confused and it is annoying how a simple task as this is so difficult. Here are what I tried to do: Given a text label and a button, Evry time I press the button I'd like to read a system dependent time data(for example getCPUTtime) and write it back on the label. Given a text label and a timer. Evry time the timer condition fires i'd like to read a system dependent time data...(like above) and write it back I couldn't do any of these. Mostly because if acquire any data it comes in the form of IO <sometype> and set doesn't accept IO type. So I cannot set the new value. I coouldn't find any function in the wxhaskell documentation or tutorials that sets anything based on IO types. I also found a function unsafePerformIO which could convert an IO to a non IO type but I couldn't do it anyway. I almost did the second task but the label didn't refresh by itself. It only refreshed itself when I moved the window along or continually resized it. Can anybody help me? Ther must be some way to do these things. They cannot be impossible because they are very basic tasks. |
From: Lyle K. <li...@qs...> - 2009-11-21 02:04:04
|
OK, thanks, I set that variable as you suggested, but I still get the error below: [22 of 22] Compiling Graphics.UI.WXCore ( src\haskell\Graphics\UI\WXCore.hs, dist\build\Graphics\UI\WXCore.o ) In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, from c:/wxWidgets-2.8.10/include/wx/object.h:20, from c:/wxWidgets-2.8.10/include/wx/wx.h:16, from src/include/wrapper.h:20, from src\cpp\apppath.cpp:1:0: c:/wxWidgets-2.8.10/include/wx/string.h:176:18: string: No such file or directory In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, from c:/wxWidgets-2.8.10/include/wx/object.h:20, from c:/wxWidgets-2.8.10/include/wx/wx.h:16, from src/include/wrapper.h:20, from src\cpp\apppath.cpp:1:0: c:/wxWidgets-2.8.10/include/wx/string.h:181: error: expected initializer before "wxStdString" c:/wxWidgets-2.8.10/include/wx/string.h:714: error: expected `,' or `...' before '&' token c:/wxWidgets-2.8.10/include/wx/string.h:715: error: ISO C++ forbids declaration of `wxStdString' with no type c:/wxWidgets-2.8.10/include/wx/string.h:715: error: `wxString::wxString(int)' and `wxString::wxString(int)' cannot be overloaded c:/wxWidgets-2.8.10/include/wx/string.h: In constructor `wxString::wxString(int)': c:/wxWidgets-2.8.10/include/wx/string.h:715: error: `s' was not declared in this scope cabal.exe: Error: some packages failed to install: wx-0.12.1.2 depends on wxcore-0.12.1.2 which failed to install. wxcore-0.12.1.2 failed during the building phase. The exception was: exit: ExitFailure 1 I noticed that the directory 'c++' does not exist inside C:\MinGW\include. >From what package would that come? I've installed gcc-c++-4.4.0-mingw32-bin.tar.gz, but that doesn't contain an 'include' directory. Thanks, Lyle On Fri, Nov 20, 2009 at 9:05 AM, Henk-Jan van Tuyl <hj...@ch...>wrote: > On Fri, 20 Nov 2009 09:33:21 +0100, Lyle Kopnicky <li...@qs...> wrote: > > I am now getting pretty far through the cabal build (using >> wxWidgets-2.8.10 >> and MinGW on Windows 7 64-bit), but am getting this error: >> >> [22 of 22] Compiling Graphics.UI.WXCore ( >> src\haskell\Graphics\UI\WXCore.hs, >> dist\build\Graphics\UI\WXCore.o ) >> In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, >> from c:/wxWidgets-2.8.10/include/wx/object.h:20, >> from c:/wxWidgets-2.8.10/include/wx/wx.h:16, >> from src/include/wrapper.h:20, >> >> from src\cpp\apppath.cpp:1:0: >> c:/wxWidgets-2.8.10/include/wx/string.h:176:18: string: No such file or >> directory >> > > The file "string" is a C++ include file that can be found using a seperate > search path; as I wrote last Sunday to the wxHaskell users mailinglist: > Set > CPLUS_INCLUDE_PATH=C:\MinGW\include\c++\3.4.5;C:\MinGW\include\c++\3.4.5\mingw32\ > before > cabal install wx > > Your path may of course be different. "Set" is an MS-DOS command; you don't > need to start an MSYS shell to compile wxHaskell. > > -- > Regards, > Henk-Jan van Tuyl > > > -- > http://Van.Tuyl.eu/ > http://members.chello.nl/hjgtuyl/tourdemonad.html > -- > |
From: Henk-Jan v. T. <hj...@ch...> - 2009-11-20 17:05:55
|
On Fri, 20 Nov 2009 09:33:21 +0100, Lyle Kopnicky <li...@qs...> wrote: > I am now getting pretty far through the cabal build (using > wxWidgets-2.8.10 > and MinGW on Windows 7 64-bit), but am getting this error: > > [22 of 22] Compiling Graphics.UI.WXCore ( > src\haskell\Graphics\UI\WXCore.hs, > dist\build\Graphics\UI\WXCore.o ) > In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, > from c:/wxWidgets-2.8.10/include/wx/object.h:20, > from c:/wxWidgets-2.8.10/include/wx/wx.h:16, > from src/include/wrapper.h:20, > > from src\cpp\apppath.cpp:1:0: > c:/wxWidgets-2.8.10/include/wx/string.h:176:18: string: No such file or > directory The file "string" is a C++ include file that can be found using a seperate search path; as I wrote last Sunday to the wxHaskell users mailinglist: Set CPLUS_INCLUDE_PATH=C:\MinGW\include\c++\3.4.5;C:\MinGW\include\c++\3.4.5\mingw32\ before cabal install wx Your path may of course be different. "Set" is an MS-DOS command; you don't need to start an MSYS shell to compile wxHaskell. -- Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html -- |
From: Lyle K. <li...@qs...> - 2009-11-20 08:33:34
|
Hi folks, I am now getting pretty far through the cabal build (using wxWidgets-2.8.10 and MinGW on Windows 7 64-bit), but am getting this error: [22 of 22] Compiling Graphics.UI.WXCore ( src\haskell\Graphics\UI\WXCore.hs, dist\build\Graphics\UI\WXCore.o ) In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, from c:/wxWidgets-2.8.10/include/wx/object.h:20, from c:/wxWidgets-2.8.10/include/wx/wx.h:16, from src/include/wrapper.h:20, from src\cpp\apppath.cpp:1:0: c:/wxWidgets-2.8.10/include/wx/string.h:176:18: string: No such file or directory In file included from c:/wxWidgets-2.8.10/include/wx/memory.h:16, from c:/wxWidgets-2.8.10/include/wx/object.h:20, from c:/wxWidgets-2.8.10/include/wx/wx.h:16, from src/include/wrapper.h:20, from src\cpp\apppath.cpp:1:0: c:/wxWidgets-2.8.10/include/wx/string.h:181: error: expected initializer before "wxStdString" c:/wxWidgets-2.8.10/include/wx/string.h:714: error: expected `,' or `...' before '&' token c:/wxWidgets-2.8.10/include/wx/string.h:715: error: ISO C++ forbids declaration of `wxStdString' with no type c:/wxWidgets-2.8.10/include/wx/string.h:715: error: `wxString::wxString(int)' and `wxString::wxString(int)' cannot be overloaded c:/wxWidgets-2.8.10/include/wx/string.h: In constructor `wxString::wxString(int)': c:/wxWidgets-2.8.10/include/wx/string.h:715: error: `s' was not declared in this scope cabal.exe: Error: some packages failed to install: wx-0.12.1.2 depends on wxcore-0.12.1.2 which failed to install. wxcore-0.12.1.2 failed during the building phase. The exception was: exit: ExitFailure 1 Am I missing some files? Thanks, Lyle |
From: Lyle K. <li...@qs...> - 2009-11-20 08:28:45
|
OK, I figured it out. In your instructions, instead of 'set' it should say 'export' before the variable name. Thanks for putting this package together. - Lyle On Fri, Nov 20, 2009 at 12:23 AM, Lyle Kopnicky <li...@qs...> wrote: > Hi Jeremy, > > This build is not working for me, I'm afraid. It does a bunch of good > stuff, like: > > parsing: src/eiffel/wxc_defs.e > parsing: src/eiffel/wx_defs.e > parsing: src/eiffel/stc.e > generating: src/haskell/Graphics/UI/WXCore/WxcDefs.hs > generated 2439 constant definitions > ok. > > But then it dies with: > > Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets) > or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets) > to specify where is your installation of wxWidgets. > setup.exe: readProcess: wx-config "--libs" "--cppflags" (exit 1): failed > cabal.exe: Error: some packages failed to install: > wx-0.12.1.2 depends on wxcore-0.12.1.2 which failed to install. > wxcore-0.12.1.2 failed during the configure step. The exception was: > exit: ExitFailure 1 > > Well, I had set the WXWIN variable to /c/wxWidgets-2.8.10, so I don't know > why it would act like I hadn't. I also tried using the --prefix flag. I also > tried using a Windows-style path of C:\wxWidgets-2.8.10. None of this got > any different result. > > Any ideas? > > Thanks, > Lyle > > On Fri, Nov 13, 2009 at 3:55 PM, Jeremy O'Donoghue < > jer...@gm...> wrote: > >> Hi all, >> >> On behalf of the wxHaskell maintainers, I am very pleased to announce >> the release of wxHaskell 0.12.1.2. >> >> The key feature of this release is that it is now possible to install >> wxHaskell entirely using cabal on all targets (with a minor proviso on >> Windows). The credit for this achievement is almost all down to new >> contributor Brian Lewis, who has worked very hard to make this work >> 'just right', and given me (at least) an object lesson in how to use >> Cabal. >> >> The small proviso for Windows machines is that wxWidgets should be >> built using MSys - none of the other compilers supported by wxWidgets >> is currently working, but we consider this a small price to pay for >> the convenience of getting a GUI straight from cabal. >> >> For Unix machines which have wxWidgets 2.8.x installed, you should now >> be able to install wxHaskell with a simple: >> >> cabal install wx >> >> For Windows machines, there are a few prerequisites: >> >> 1) You will need the Windows port of wx-config in your path. This can >> be downloaded from http://wxconfig.googlepages.com/ >> 2) You will need to compile wxWidgets using MSys. We have tested >> against MinGW 5.1.6 with g++ compiler, MinGW Make, MSYS-1.0.11, >> wxMSW-2.8.10, which are the latest versions, and can be downloaded >> from their respective websites. I used a completely clean install of >> the latest Haskell Platform to validate the procedure. >> >> Please note: all commands to be entered in an MSys shell. >> >> cd /c/path/to/wxWidgets-2.8.10/build/msw >> mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=1 UNICODE=1 >> >> set PATH=$PATH:/c/path/to/wx-config >> set WXWIN=/c/path/to/wxWidgets-2.8.10 >> set WXCFG=gcc_dll/mswu >> cabal install wx >> >> I will be updating the wxHaskell wiki to reflect these changes over >> the next day or so. >> >> Best Regards >> Jeremy O'Donoghue on behalf of the wxHaskell maintainers. >> _______________________________________________ >> Haskell-Cafe mailing list >> Has...@ha... >> http://www.haskell.org/mailman/listinfo/haskell-cafe >> > > |