Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Dec 2007
    Posts
    3
    Vote Rating
    0
    lightglitch is on a distinguished road

      0  

    Default [FIXED][3.0] Eval usage

    [FIXED][3.0] Eval usage


    I'm wondering why do you still (in version 3) use the eval function is several parts of the code instead of using always the same function to parse JSON.

    For example in the JSONReader:

    Code:
        readResponse : function(response) {
            var json = response.responseText;
            var o = eval("("+json+")");
            if(!o) {
                throw {message: "JsonReader.read: Json object not found"};
            }
            return o;
        }
    Why don't you just use:

    Code:
            var o = Ext.decode("("+json+")");

  2. #2
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,407
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default


    Yeah, when I mentioned it before I forgot to mention readResponse as well as read...

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,127
    Vote Rating
    516
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Mostly just an oversight, it doesn't really affect much, but it would be nice to fix up.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Ext User
    Join Date
    Dec 2007
    Posts
    3
    Vote Rating
    0
    lightglitch is on a distinguished road

      0  

    Default


    Quote Originally Posted by stever View Post
    Yeah, when I mentioned it before I forgot to mention readResponse as well as read...
    I missed your thread, but I just give that as an example.

    If you search for eval in ext-all-debug.js it's used in much more places and if the Ext.decode already takes in account the browser support for JSON, should be used everywhere.

    Quote Originally Posted by evant View Post
    Mostly just an oversight, it doesn't really affect much, but it would be nice to fix up.
    Agree.

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,127
    Vote Rating
    516
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    In a lot of places we still need to use eval(), the only outstanding place where it should use decode() is in the JsonReader, which I've just committed.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar