1
Gtk2hsでコンボボックスを処理するにはどうすればよいですか?Gtk2hsコンパイルエラーのコンボボックス
Main.hs:36:17:
No instance for (System.Glib.UTFString.GlibString (Maybe [Char]))
arising from a use of ‘cellText’
In the first argument of ‘(:=)’, namely ‘cellText’
In the expression: cellText := Just txt
In the expression: [cellText := Just txt]
はどのように問題を解決することができます:私は(私のコード例の最後の行で発生します)このエラーを取得するコンパイル中しかし
store <- listStoreNew ["green", "yellow", "..."]
comboElem <- comboBoxNewWithModel store
ren <- cellRendererTextNew
cellLayoutPackEnd comboElem ren True
cellLayoutSetAttributes comboElem ren store
(\txt -> [cellText := Just txt])
:thisページで は私が解決策を見つけましたか?事前に
おかげ
'cellText'のプロパティタイプは、ある時点(いくつかのGtk2HSバージョンで)' GlibString a =>多分a'から 'GlibString a => a'に変更されているでしょう。 – Cactus