lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

My application is centered on a TreeView but the number of columns
depends on provided data : So I can't hardcode columns as in examples I
found.

I tried the following code :

            local tree = Gtk.TreeView {
                id = 'list',
                model = list
            }

            local col = Gtk.TreeViewColumn {
                title = "Ignore it ?",
                sizing = 'FIXED',
                fixed_width = 70,
                {
                    Gtk.CellRendererToggle { id = 'ignored' },
                }
            }
            tree.insert_column( col )

            report = Gtk.ScrolledWindow {
                shadow_type = 'ETCHED_IN',
                hscrollbar_policy = 'NEVER',
                expand = true,
                tree
            }

But Lua crashed wit a Segmentation fault at tree.insert_column( col )

Any idea how I can achieve this ?

Thanks

Laurent