[Fxruby-users] Cannot connect to SEL_DELETED on a treeList
Status: Inactive
Brought to you by:
lyle
|
From: Daniel S. <da...@pr...> - 2004-03-11 02:11:11
|
Eeep. And now more segfaults. Either I'm missing out on some
fundamentals here, or there's much bugginess about.
Once I connect to SEL_DELETED on a @treeList, I get a segfault on exit
if the tree isn't empty. If I run the following program and exit
immediately, I get a segfault. If I click the item (removing it), it
exits cleanly.
---
class TestWindow < FXMainWindow
=20 def initialize(parent)
=20 super(parent, "test", nil, nil, DECOR_ALL, 0, 0, 400, 300)
=20 @treeList =3D FXTreeList.new(self, 0)
=20 @treeList.connect(SEL_DELETED) { |a,b,item| puts "deleted"}
=20 @treeList.connect(SEL_CLICKED) { |a,b,item|
@treeList.removeItem(item, true); puts "removed"}
=20 item =3D @treeList.addItemLast(nil, FXTreeItem.new("hello"), true)
=20 end
=20 def create
=20 super
=20 show(PLACEMENT_SCREEN)
=20 end
end
=20 =20
if __FILE__ =3D=3D $0
=20 FXApp.new("test7", "test") do |theApp|
=20 TestWindow.new(theApp)
=20 theApp.create
=20 theApp.run
=20 end
end
#########################################################################=
############
This email has been scanned by MailMarshal, an email content filter.
#########################################################################=
############
|