projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
257fb4d
)
tools/build_gtk_tree.js
author
Alan Knowles
<alan@roojs.com>
Fri, 10 Aug 2012 10:23:09 +0000
(18:23 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 10 Aug 2012 10:23:09 +0000
(18:23 +0800)
tools/build_gtk_tree.js
patch
|
blob
|
history
diff --git
a/tools/build_gtk_tree.js
b/tools/build_gtk_tree.js
index
bc550cb
..
8f0f940
100644
(file)
--- a/
tools/build_gtk_tree.js
+++ b/
tools/build_gtk_tree.js
@@
-276,8
+276,9
@@
function BuildLists () {
if (method !='Gtk.Container:add') {
return true;
}
if (method !='Gtk.Container:add') {
return true;
}
-
- var cls = parent.split('.').pop();
+ var ar = parent.split('.')
+ var cls =ar[1];
+ var ns =ar[0];
/*
if (parent == 'Gtk.Bin' || methods['Gtk.Bin'].extendsClasses.indexOf(parent) > -1) {
/*
if (parent == 'Gtk.Bin' || methods['Gtk.Bin'].extendsClasses.indexOf(parent) > -1) {
@@
-293,9
+294,15
@@
function BuildLists () {
}
*/
}
*/
- //print("TRY ctor: " + parent );
-
- var x = new imports.gi.Gtk[cls]();
+
+ try {
+ var x = new imports.gi[ns][cls]();
+ } catch(e) {
+ print("TRY ctor: " + parent );
+ print(e.toString());
+ return false;
+ }
+
//print("TRY child type: " + parent);
print(parent + " : says children are of type : " + x.child_type());
//print("TRY child type: " + parent);
print(parent + " : says children are of type : " + x.child_type());