Questions tagged [wxhaskell]

A Haskell binding for wxWidgets

WxHaskell is a GUI library for Haskell built ontop of wxwidgets

83 questions
1
vote
0 answers

Play sound with wxhaskell not working on OSX?

import Graphics.UI.WX main :: IO () main = start $ do f <- frame [] p <- panel f [] set f [layout := minsize(Size 100 100) $ widget p] play (sound "alarm.wav") This does not play a sound as I had hoped. This advice from around 2006…
Schoon
  • 394
  • 1
  • 9
1
vote
1 answer

wxHaskell : the window appears too tiny

I have a little program in haskell, using wxhaskell. It displays a window with a panel inside, containing some drawings. The problem is that the window shrinks to a very tiny size, and I have to expand it with the mouse. How can I define correctly…
lolveley
  • 1,659
  • 2
  • 18
  • 34
1
vote
2 answers

Should I be able to compile reactive-banana-wx with "stack build" alone?

I cloned reactive-banana and tried to build the reactive-banana-wx example: git clone http://github.com/HeinrichApfelmus/reactive-banana.git cd reactive-banana/reactive-banana-wx stack build There is a stack.yaml in that directory, and it does…
kostmo
  • 6,222
  • 4
  • 40
  • 51
1
vote
1 answer

-like UI element for wxHaskell/wxWidgets
I am working on writing a GUI in Haskell (and Ur/Web, but that is another story), and have several development branches using different libraries and approaches that I am working on contemporaneously. In trying to migrate some of the code I had from…
1
vote
1 answer

wxHaskell on win7, can't find wxc.dll or .so

I have installed wxwidget and wxhaskell(using cabal) on windows7 and I made a test.hs import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [text := "Hello"] inp <- entry f [] out <- entry f [] …
zjyfdu
  • 65
  • 1
  • 8
1
vote
2 answers

Given a function g :: a -> b -> .... -> z, how can I use it like h :: (a, b, ...) -> z?

Background: I'm working with wxHaskell's fileOpenDialog, which takes 6 non-obvious parameters (curried). My code is currently: maybePath <- fileOpenDialog w useLastSelectedDir canSelectReadOnly frameName possibleFiles initialDir…
allidoiswin
  • 2,543
  • 1
  • 20
  • 23
1
vote
1 answer

Update widget text with wx haskell

I'm making a simple image downloader to learn some basic gui things in haskell. I have a staticText box that displays the file names while it's downloading them. The problem I'm having is with this little recursive function. saveImgs :: [String] ->…
Obrazi
  • 77
  • 7
1
vote
1 answer

wxhaskell notebook with imageTag segfaults

I just can't get imageTab to run. I get a Segmentation fault: 11. This is my code. Does anybody know what to do? import Graphics.UI.WX import Graphics.UI.WXCore main :: IO () main = start gui gui :: IO () gui = do f <- frame [] fp <-…
Schoon
  • 394
  • 1
  • 9
1
vote
1 answer

Linker error while building statically-linked wxHaskell application

I am trying to statically link a wxHaskell Windows application using this ghc -static -optl-static flag. But ld.exe returns a linker error c:/program files/haskell…
Verbatim
  • 117
  • 7
1
vote
1 answer

Display a full image with wxHaskell

I am using wxHaskell to display a full image in a window. My code is: import Graphics.UI.WX import Graphics.UI.WXCore main :: IO () main = start testimg testimg :: IO () testimg = do f <- frame [text := "Test Image"] p <- panel f [] image…
Randomize
  • 8,651
  • 18
  • 78
  • 133
1
vote
1 answer

displaying database content in wxHaskell

Im using tutorials from wxHaskell and want to display content of table movies in the grid. HEre is my code : {-------------------------------------------------------------------------------- Test…
gruber
  • 28,739
  • 35
  • 124
  • 216
1
vote
1 answer

How to get the newly selected page index upon a notebook changed page event with wxHaskell?

Below is a Haskell program which launches a wxHaskell notebook. It works, except that I cannot manage to handle a page change event so as to get the index of the newly selected page. I get the previous one instead (see comment "PROBLEM" in the code…
basil85
  • 11
  • 3
1
vote
0 answers

Respond to key events globally

How do I respond to keyboard events regardless of what widget currently has the focus? For example, the following program only responds to a keyboard event with a "Key pressed" message when the textCtrl isn't being focused on, which isn't what I…
mcjohnalds45
  • 667
  • 1
  • 8
  • 16
1
vote
2 answers

StateT and WX gui coexistance

usual wxHaskell program looks like main = do run gui gui = do .... .... gui must have type IO a, run has type IO a -> IO (), also there is some initialization routines in run. I'm tring to do following: data AppGlobals = AG {…
Vasiliy Stavenko
  • 1,174
  • 1
  • 12
  • 29
1
vote
1 answer

why mingw32 and tdm-gcc64 behave differently using external gcc

I am trying to cabal install a component of wxHaskell (Haskell platform 2013.2 against wxWidgets 3.0). I was able to compile the git version with 32 bit mingw from mingw.org. But in the end, the installed wx cannot function correct, and running a…
thor
  • 21,418
  • 31
  • 87
  • 173