2015-11-13 38 views
1

我只是不能得到imageTab運行。我得到一個Segmentation fault: 11。這是我的代碼。有人知道該怎麼做嗎?wxhaskell筆記本與imageTag段錯誤

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)]] 

回答