2 Aug 2007 15:12
Segmentation fault when setting listbox items within a listbox event handler
Hi all
If I run the following program:
{-# OPTIONS -fglasgow-exts #-}
module Main where
import Graphics.UI.WX
main = start $
do w <- frame [text := "ListBox Event Handling"]
p <- panel w []
listBox <- multiListBox p [ items := [ "Foobar" ] ]
set listBox [ on select := do set listBox [ items := [ "foo", "Bar"] ]
propagateEvent
]
set w [ layout := container p $ widget listBox
]
and click on the listbox item "Foobar", the program crashes with:
(L:6279): Gtk-WARNING **: unable to find signal handler for object(GtkListItem:0x8425e40) with
func((nil)) and data(0x845ac18)
The problem is that I change the listbox items from within a listbox
event handler. Do anybody know if this expected behavior or is it a bug
somewhere in WxHaskell, Wxwindows, or GTK?
Of cause I can use this clumsy workaround:
(Continue reading)
RSS Feed