[seed-examples] update code to match what introspection currently does
- From: Alan Knowles <alank src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed-examples] update code to match what introspection currently does
- Date: Sat, 16 Apr 2011 04:08:53 +0000 (UTC)
commit 1046ed500e1775dc48430e0d228fb0cc8b8fc410
Author: Alan Knowles <alan akbkhome com>
Date: Sat Apr 16 12:08:18 2011 +0800
update code to match what introspection currently does
gtktreeview.js | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/gtktreeview.js b/gtktreeview.js
index 4a457eb..f8a6d13 100755
--- a/gtktreeview.js
+++ b/gtktreeview.js
@@ -18,15 +18,14 @@ v.append_column(c);
var m = new Gtk.ListStore();
m.set_column_types(1, [GObject.TYPE_INT]);
-var iter = new Gtk.TreeIter();
-m.append(iter);
-m.set_value(iter, 0, [GObject.TYPE_INT, 3]);
-m.append(iter);
-m.set_value(iter, 0, [GObject.TYPE_INT, 2]);
-m.append(iter);
-m.set_value(iter, 0, [GObject.TYPE_INT, 9]);
-
-//TODO: FIXME: Why does property not work here?
+var r = {};
+m.append(r);
+m.set_value(r.iter, 0, [GObject.TYPE_INT, 3]);
+m.append(r);
+m.set_value(r.iter, 0, [GObject.TYPE_INT, 2]);
+m.append(r);
+m.set_value(r.iter, 0, [GObject.TYPE_INT, 9]);
+
v.set_model(m);
w.add(v);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]