wxhaskell笔记本与imageTag segfaults

时间:2015-11-13 20:04:29

标签: haskell wxhaskell wxnotebook

我无法让imageTab运行。我得到Segmentation fault: 11。这是我的代码。有人知道该怎么办吗?

import Graphics.UI.WX 
import Graphics.UI.WXCore

main :: IO ()
main = start gui

gui :: IO ()
gui = do
    f  <- frame []
    fp <- panel f []

    nb <- notebook fp []
    page <- panel nb []
    b <- button page [ text := "-"]


    let bm = bitmap "favicon.ico"
    -- check that bitmap is there
    sx <- bitmapGetHeight bm
    print sx

    set f [ layout := container fp $ tabs nb [imageTab "Foo" bm (container page $ fill $ widget b)]]

    -- This works
    --set f [ layout := container fp $ tabs nb [tab "Foo" (container page $ fill $ widget b)]]

1 个答案:

答案 0 :(得分:1)

这看起来像一个bug;您最好在http://sourceforge.net/p/wxhaskell/bugs/

报告