Hybrid View

  1. #1
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default DomHelper.Template.compile

    DomHelper.Template.compile


    Instead of

    Code:
        compile : function(){
            var html = this.html;
            var re = /\{(\w+)\}/g;
            var body = [];
            body.push("this.compiled = function(values){ return ");
            var result;
            var lastMatchEnd = 0;
            while ((result = re.exec(html)) != null){
                body.push("'", html.substring(lastMatchEnd, result.index), "' + ");
                body.push("values[", html.substring(result.index+1,re.lastIndex-1), "] + ");
                lastMatchEnd = re.lastIndex;
            }
            body.push("'", html.substr(lastMatchEnd), "';};");
            eval(body.join(''));
    It should be

    Code:
        compile : function(){
            var html = this.html;
            var re = /\{(\w+)\}/g;
            var body = [];
            body.push("this.compiled = function(values){ return ");
            var result;
            var lastMatchEnd = 0;
            while ((result = re.exec(html)) != null){
                body.push("'", html.substring(lastMatchEnd, result.index), "' + ");
                body.push("values[\"", html.substring(result.index+1,re.lastIndex-1), "\"] + ");
                lastMatchEnd = re.lastIndex;
            }
            body.push("'", html.substr(lastMatchEnd), "';};");
            eval(body.join(''));
    The strings inside {}s are the property names in the values associative array.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    It's already been fixed with single quotes. There's a thread about it in the help forum.

Similar Threads

  1. Ext.DomHelper.Template: one template, ten YUI grids
    By moraes in forum Community Discussion
    Replies: 11
    Last Post: 18 Dec 2012, 4:55 AM
  2. DomHelper Template using tables (bug in ff & insert at t
    By aconran in forum Ext 1.x: Help & Discussion
    Replies: 14
    Last Post: 13 Mar 2007, 11:48 AM
  3. Ext.DomHelper.Template or Ext.Template?
    By mystix in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 1 Mar 2007, 3:05 PM
  4. DomHelper.Template and UpdateManager
    By valc in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 4 Jan 2007, 8:44 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi