Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-918 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    jurrie is on a distinguished road

      0  

    Default [PR1] Newlines break XTemplate.from

    [PR1] Newlines break XTemplate.from


    A feature I loved in Sencha 1.1 was creating templates from HTML nodes:

    Code:
    tpl: Ext.XTemplate.from('myTemplate', { method: function() });
    This does work when I, for example, have the following HTML node:

    Code:
    <textarea id="myTemplate" class="x-hidden-display"><p>Name: {name}</p></textarea>
    However, when using newlines in the template, things go wrong:

    Code:
    <textarea id="myTemplate" class="x-hidden-display">
        <p>Name: {name}</p>
    </textarea>
    This results in an uncaught SyntaxError:

    Code:
    Uncaught SyntaxError: Unexpected token ILLEGAL
    Ext.define.compilesencha-touch-all-debug-w-comments.js:22237
    Ext.define.applyOutsencha-touch-all-debug-w-comments.js:22804
    Ext.define.applysencha-touch-all-debug-w-comments.js:22792
    Ext.define.overwritesencha-touch-all-debug-w-comments.js:22205
    Ext.define.updateDatasencha-touch-all-debug-w-comments.js:51379
    ExtClass.registerPreprocessor.Ext.Object.each.data.(anonymous function)sencha-touch-all-debug-w-comments.js:5381

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    This has been fixed for the next release.

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 1