gtk2hs:无法在Windows上呈现组合框

时间:2013-12-10 22:41:19

标签: windows haskell gtk2hs

我的问题让我非常困惑,因为它只出现在Windows上(我正在用XP测试)。这一切都完全适用于Linux。

我使用gtkbuilder加载我的布局。 (如果重要的话)

route_input <- builderGetObject builder castToComboBox "route"
comboBoxSetModelText route_input
comboBoxAppendText route_input "first"
comboBoxAppendText route_input "second"
comboBoxAppendText route_input "third"
t <- listStoreToList =<< comboBoxGetModelText route_input
putStrLn $ show t

打印:

["first","second","third"]

在窗口中,它显示一个包含三个条目的组合框,所有条目都是空白的 我点击“确定”按钮,它在其信号处理程序中运行以下代码:

t <- listStoreToList =<< comboBoxGetModelText cbox
putStrLn $ show t
selection <- comboBoxGetActiveText cbox
putStrLn $ show selection

打印:

["first","second","third"]
Nothing

有没有人对此有任何想法?

1 个答案:

答案 0 :(得分:0)

好的,事实证明这是一个包版本问题。 Windows版本中的gtk软件包比Linux机器上的版本高一个版本。那一定是打破了。