Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public struct MyStruct {
- string id;
- }
- public int main(string[] args) {
- Gtk.init(ref args);
- var mystruct = MyStruct();
- mystruct.id = "The ID";
- var model = new Gtk.ListStore(1, typeof(MyStruct));
- Gtk.TreeIter iter;
- model.append(out iter);
- model.set(iter, 0, mystruct, -1);
- MyStruct mystruct2;
- model.get(iter, 0, out mystruct2, -1);
- stdout.printf(mystruct2.id.to_string() + "\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement