X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JsTemplate%2FTemplate.js;h=6adb708ed9c90299c5114f19e7a5224d28c77f9b;hp=4cfbe8f7194361f47263b194e6b6a6ba8739b147;hb=HEAD;hpb=7df69dffc97bc385bfb7617fdac6beea1fb1b7c6 diff --git a/JsTemplate/Template.js b/JsTemplate/Template.js index 4cfbe8f..6adb708 100644 --- a/JsTemplate/Template.js +++ b/JsTemplate/Template.js @@ -132,7 +132,7 @@ Template = XObject.define( var values = this.values; var makeSortby = this.makeSortby; - var makeSignature = this.makeSignature; + var makeSignature = XObject.createDelegate(this.makeSignature, this); var summarize = this.summarize ; var makeFuncSkel = this.makeFuncSkel; var resolveLinks = this.resolveLinks; @@ -141,15 +141,15 @@ Template = XObject.define( Template.data = data; var Link = this.Link; - + var Options = imports.Options ? imports.Options.Options : false; try { eval(this.code); - } catch (e) { + } catch (e) { Gio.simple_write('/tmp/template.js', this.code); Seed.print('in /tmp/template.js'); throw e; Seed.quit(); - } + } //File.write("/tmp/jstookit_eval.js", this.code); @@ -201,7 +201,7 @@ Template = XObject.define( makeSignature : function(params) { if (!params) return "()"; - var _this = this; + var Link = this.Link; var signature = "(" + params.filter( function($) { @@ -214,7 +214,7 @@ Template = XObject.define( return "" + ($.isOptional ? "[" : "") + (($.type) ? - (new _this.Link().toSymbol( + (new Link().toSymbol( (typeof($.type) == 'object' ) ? 'Function' : $.type )) + " " : "" ) +