1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    2
    Vote Rating
    0
    kschneid is on a distinguished road

      0  

    Default unterminated string literal error in yui-ext.js 0.32.2?

    unterminated string literal error in yui-ext.js 0.32.2?


    Just upgraded to 0.32.2 and got the following error (WinXP FF 1.5.0.7):

    unterminated string literal
    yui-ext.js (line 85)
    this.compiled = function(values){ return '<span class="ygrid-hd ygrid-header-' + values[0] + '" toJSONString="function () {

    This happens on page load. I haven't seen anyone else report it, so maybe it's just me, but just in case...

    Kris

  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


    Hi kschneid,

    Is it possible you can put up a page with the error? I downloaded the zip from the server and can't seem to get the error.

    BTW, do you have toJSONString() defined somewhere? I pretty sure that function isn't in yui-ext and I'm wondering how it ended up in the middle of grid header building code.

    Jack

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    2
    Vote Rating
    0
    kschneid is on a distinguished road

      0  

    Default


    Can't put up a page at the moment, but I'll look a little closer at my env. I was using 0.32.1 w/o a problem and merely copied the new yui-ext.js.

    As for toJSONString, I'm also using json.js (http://www.json.org/js.html) which adds toJSONString to the prototypes of both Object and Array. Again, not sure why that's all of a sudden an issue, but I'll poke around a bit...

    Kris

  4. #4
    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


    The headers in the grid are built by enumerating attributes in an object literal (new in this version, provided by DomHelper). The json site you pointed me to is extending the Object prototype.

    Extending the Object prototype is generally frowned upon because it breaks for ... in statements. Object literals end up with functions and enumerating them requires you to check every entry to see if it's a function. Most of the code I develop assumes people follow this unofficial "standard".

    I will include a check in the next maintence release to filter functions but there could be other spots in yui-ext affected by this.

    On a side note, to avoid possible conflicts with not only yui-ext but other libraries you might include as well, I would recommend (if it's an option) to remove that function from the Object prototype. The difference between calling, say, JSON.encode(obj) and obj.toJSONString() is minimal. Actually I just counted and it's 2 characters shorter.

Similar Threads

  1. Grid/XML problem - "unterminated regular expression lit
    By Saeven in forum Ext 1.x: Help & Discussion
    Replies: 13
    Last Post: 10 Nov 2010, 2:58 AM
  2. String Concatination
    By ravipati_raja in forum Community Discussion
    Replies: 1
    Last Post: 29 Mar 2007, 4:43 AM
  3. Unclosed string literal on ext-all-debug.js file
    By Skeleton in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Feb 2007, 8:38 PM
  4. Open tab using url and query string.
    By valc in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 10 Jan 2007, 10:36 AM
  5. Date string cannot be formatted
    By qiuyl in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 12 Dec 2006, 6:59 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