From: Alan Knowles Date: Fri, 26 Nov 2010 07:35:01 +0000 (+0800) Subject: XObject.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=928d5f2e54889dc6faf64ea5f4e0149b306b87e0 XObject.js --- diff --git a/XObject.js b/XObject.js index e27769a06..d3e7edbc9 100644 --- a/XObject.js +++ b/XObject.js @@ -753,7 +753,26 @@ XObject.extend(XObject, */ baseXObject : function(cfg) { - + try { + // loocks for XObject/Gtk/TreeView.js [ TreeView = { .... } ] + // xns is not a string!!!? + var gname = false; + if (typeof(cfg.xtype) == 'object') { + gname = XObject.type(cfg.xtype); + + } + + // in the situation where we have been called and there is a base object + // defining the behavior.. + // then we should copy the prototypes from the base object into this.. + var base = gname ? imports.XObjectBase[gname][gname] : false; + return base; + + } catch (e) { + // if debug? + XObject.log("error finding " + gname + " - " + e.toString()); + return false; + } },