Questions tagged [wxhaskell]
A Haskell binding for wxWidgets
83
questions
0
votes
1answer
184 views
stack is unable to resolve dependencies instaling wx
I am trying to get wx installed using stack. I don't have Haskell installed globally and use stack new <app> new-template to create a new project. Next, within the directory I run stack install ...
0
votes
0answers
274 views
Install wxHaskell 64 on Windows 10 get error (foreign import ccall “boolToInt” cboolToInt :: CBool -> Int). What to do?
I have Windows 10
I installed Haskell Platform 8.2.1 (HaskellPlatform-8.2.1-full-x86_64-setup.exe from https://www.haskell.org/platform/windows.html) (This version have mingw and gcc 6.2.0 for what ...
2
votes
1answer
57 views
Set display font family in wxhaskell?
I'm trying to build a little program to learn some wxHaskell, a haskell library for wxwidgets.
It would be beneficial for this particular one if I could set the font of a text field to monospaced, ...
2
votes
0answers
66 views
Updating visibility of dynamically created content
Duplicating this from github as per @HeinrichApfelmus's suggestion:
This may be just a usage error on my part, but I am noticing a strange phenomenon when trying to set up conditional visibility/...
0
votes
1answer
84 views
Window-less event injection into wxWigets event loop using wxHaskell
Another take on Haskell-way multithreading and wxWidgets.
I see https://stackoverflow.com/a/12596595/4095104 as a nice hack to run code in the wx event loop, but it requires me to create a window in ...
0
votes
0answers
55 views
wxHaskell: resize layout to accommodate dynamic contents
I am having some difficulty with dynamic layouts in wxHaskell. I have nested Panels, and the layout of the innermost panel often changes in a way that causes it to outgrow its parent's size.
I am ...
3
votes
1answer
159 views
Unable to runhaskell my wxHaskell program that works in GHCI
I am trying to create a HelloWorld.exe on Windows 7 that demonstrates a very simple wxHaskell program I have found online. The code is below:
module HelloWorldWX where
import Graphics.UI.WX
main :: ...
0
votes
1answer
58 views
wxhaskell: Updating a statusField using “on click” of a panel
I would like some advice on how to update a "statusField" after
clicking on a "panel".
The following program demonstrates the problem. The program draws two
frames. You can imagine the left frame to ...
2
votes
1answer
471 views
How to use stack with nix to build wxHaskell project?
I'm trying to set up a build environment for wxHaskell using Nix and Stack.
I've installed wxWidgets-3.0.2 through nix. This is the relevant portion from by .cabal file
executable hellowx-exe
hs-...
0
votes
2answers
770 views
How to install wxHaskell?
I have downloaded the latest Haskell Platform(8.0.1 version) for Windows 7, wxWidgets-3.0.2, set all the needed environment variables. I have successfully installed "wxdirect" using "cabal install", ...
1
vote
1answer
108 views
WxHaskell breaks command line arg functionality
I've written a program in WXHaskell, and verified that it works. Long story short, I planned for the program to be usable via GUI or by command line interface. I later went on to add command line ...
0
votes
2answers
68 views
wxHaskell Button State
I'm writing an application using wxHaskell and I want to be able to detect the state of a button (whether or not it is pressed at any given time). I'm having a bit of trouble figuring out how to do ...
1
vote
0answers
66 views
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 ...
1
vote
1answer
47 views
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 ...
1
vote
2answers
100 views
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 ...
1
vote
1answer
75 views
<table>-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. ...
0
votes
1answer
57 views
How do I focus a widget?
When I start my application I want to set the focus on a certain button. Currently I need to hit tab once to have the button focused.
The wxwidgets documents mention a SetFocus method (link) which ...
1
vote
1answer
75 views
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"]
...
2
votes
1answer
161 views
wxHaskell not find module `Distribution.Compat.Exception'
I am trying install wxhaskell on ubuntu
(and I have already installed wxwidget and it works well in codeblock)
I run cabal install wxc in terminal
and here is output
/tmp/wxc-0.92.1.1-2711/wxc-0.92....
1
vote
2answers
79 views
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
...
4
votes
1answer
2k views
Why does Stack not recognize the dependency it just installed?
So I'm trying to use reactive-banana + wxHaskell for GUI programming. As a newbie to Haskell and its dev tools, I'm very perplexed by stack.
So I try stack install wx, which prompts me to install ...
1
vote
1answer
126 views
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 ...
1
vote
1answer
45 views
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 :...
4
votes
0answers
71 views
Multi-threading on wxHaskell
Has anyone used multi-threading safely in wxHaskell? I am trying to determine if a wxHaskell program could use multi cores to do background processing.
The link below explains how to do this safely ...
0
votes
1answer
81 views
wxWebView in wxHaskell
I'm trying to show a web page inside my wxHaskell based application for Mac. I tried to use HtmlWindow, which is very limited. According to the wxWidgets' documentation, I have to use wxWebView, which ...
3
votes
2answers
770 views
Haskell cabal install wx: missing C library wx_gtk2u_webview-3.0
I am trying to install wx by cabal install wx
Configuring wxc to build against wxWidgets 3.0
setup: Missing dependency on a foreign library:
* Missing C library: wx_gtk2u_webview-3.0
This problem can ...
1
vote
1answer
151 views
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 platform/2014.2.0.0/mingw/bin/../...
1
vote
1answer
165 views
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 <- ...
2
votes
1answer
118 views
wxHaskell: convert Data.ByteString to Image
I have some raw data that represents an image as Data.ByteString. Is there a way in wxHaskell to convert it to an image/bitemap?
This raw data can be an image like PNG/JPG/GIF, so it will start with ...
2
votes
0answers
43 views
Making a label selectable in wxHaskell
I am writing a utility application in wxHaskell, and the users of this application will frequently need to copy-and-paste from the output of the application into other programs on their computer. The ...
0
votes
1answer
127 views
change wxhaskell layout programmatically
I want to switch layouts after an event (ie click on button). So I set the new layout and repaint the panel, but the layout doesn't change. (It does so only after I resize the frame by hand.) What's ...
1
vote
1answer
96 views
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 ...
4
votes
0answers
217 views
Dynamically adding and removing widgets
I'd like to dynamically add and remove widgets in a wxHaskell application.
My problems are:
the window is resizable, but when it's manually made larger, clicking the "more" button shows it quickly ...
1
vote
0answers
35 views
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 ...
0
votes
1answer
124 views
How can I obtain device context (DC) in wxHaskell?
I am using wxHaskell to display GUI of simple Haskell game.
I have a problem: I am writing GUI part of the simple game. When game state is updated one of the functions of GUI module is being invoked ...
1
vote
1answer
292 views
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 ...
2
votes
2answers
260 views
undefined reference to wxLog::DoLog error building wxHaskell against wxWidget 3.0
I am trying to build wxHaskell for wxWidgets 3.0. I used the latest git version of wxHaskell from https://github.com/wxHaskell/wxHaskell.
I tried to follow install.txt in wxHaskell-master.zip, what I ...
5
votes
1answer
857 views
How to install wxHaskell on Windows with MinGW/MSYS
I was trying to install wxHaskell into a machine running Windows XP64, with MinGW/MSYS and wxWidget 3.0 built from source using gcc. I did:
cabal install wx
and got an error:
...
Configuring wxc-0....
1
vote
2answers
477 views
Build errors when installing wxHaskell on Linux
I'm on Ubuntu 13.10 and trying to install wxHaskell. I installed wxWidgets 2.9 from the http://repos.codelite.org/wx3.0/ubuntu/ repository.
The basic cabal install wx gets me
src/cpp/eljgrid.cpp:61:...
1
vote
0answers
158 views
Haskell wx fails install Macosx
I was trying to get wxHaskell installed on my mac (Osx Mavericks). I fixed the issue with gcc, and I used brew to install wxmac (version 3.0). The issue that keeps coming up is that the hackage cabal ...
1
vote
1answer
97 views
wxHaskell segfaults on GUI restart due to stack overflow
When a wxHaskell GUI is started and closed, and then another wxHaskell GUI is started again, the application gets segmentation fault due to stack overflow.
Simple demonstration source:
module Main ...
5
votes
2answers
435 views
How to redistribute wxHaskell apps?
I am using ghc 7.6.3. I installed wxHaskell from here: https://github.com/wxHaskell/wxHaskell
It worked, the sample programs compile and the run successfully.
The only problem now is that I want to ...
2
votes
0answers
244 views
WxHaskell and DragAndDrop: how to create custom event to trigger dropTargetOnData, dropTargetOnDrop, dropTargetOnEnter, dropTargetOnDragOver
WxHaskell and DragAndDrop
I would like to know how to use the following events handlers
: dropTargetOnData, dropTargetOnDrop, dropTargetOnEnter, dropTargetOnDragOver….[1]
Could you check if my ...
5
votes
1answer
782 views
wx haskell Drag and Drop example
I am looking for a wx haskell Drag and Drop example. I haven't found any yet.
Any available ? or hints ?
So far:
I can see a on drag event ( but no "on drop")
mouse is just giving a left up on ...
2
votes
0answers
227 views
Separating State for a Model and GUI IO ( Wx) : Stack or FRP?
For my diagramming tool, I'd like to keep the code of the core model isolated from the GUI.
In the following example, the "state " is passed around with vDiag, which is a Tvar. This is a design ...
2
votes
0answers
110 views
wxHaskell program starts really slow on Windows XP
I have write a wxHaskell program and it performs very good on Mac. But after lot of troubles and installed wxHaskell on Windows XP, my program take several minutes to start. Currently, the wx library ...
1
vote
2answers
750 views
wxHaskell: Initial frame size too small
After having installed WxHaskell and gtk2hs I am playing around with both to work out which of them to choose. For WxHaskell I am working through the documentation at WxHaskell at haskell.org. The ...
6
votes
2answers
385 views
can't get wxHaskell to work from ghci on Mac
I'm trying to run an example using EnableGUI function.
% ghci -framework Carbon Main.hs
*Main> enableGUI >> main
This is what I get instead of a working program:
2013-01-14 00:21:03.021 ...
1
vote
1answer
997 views
Wxhaskell - wxcore fails due to building phase (g++ error)
I'm trying to build wxhaskell, and it seems there is lots of trouble, I could figure out what to do in some cases, but I'm stuck now.
I'm using wxwidgets-2.8 / wxhaskell-0.11.1.2, and the error that ...
3
votes
0answers
145 views
wxHaskell and Reactive-Banana staticText not Updating Size When Text Changes
I'm trying to build a simple UI as an exercise in learning wxHaskell and Reactive Banana, but I've run into a wall trying to solve a seemingly simple problem. Specifically, I'd like to resize the ...