【发布时间】:2018-06-04 17:04:58
【问题描述】:
当我单击 listBoxRow 时,我正在尝试打印标签文本。
这是我的要点的链接:https://gist.github.com/bigos/6cf02ff27231cfc0352394da00023f67
相关代码如下:
_ <- onListBoxRowSelected listbox2 (\(Just r) -> do
-- rn <- listBoxRowGetIndex r
cc <- containerGetChildren r
dd <- widgetGetName (head cc)
-- how do I print label text?
-- I get the error:
-- Required ancestor ‘GI.Gtk.Objects.Label.Label’ not found for type GI.Gtk.Objects.Widget.Widget’.
ee <- labelGetText (head cc)
putStrLn ("Clicked " ++ (show ee)))
错误
• 未找到类型所需的祖先“GI.Gtk.Objects.Label.Label” 'GI.Gtk.Objects.Widget.Widget'。 • 在“do”块的语句中:ee
相关文档
https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/doc-index.html
【问题讨论】:
标签: haskell