1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    56
    Vote Rating
    1
    Bob Wilson is on a distinguished road

      0  

    Default Ext.decode seems to not work properly

    Ext.decode seems to not work properly


    Hi all,

    I'm trying to decode a basic json string like this :
    Code:
    {   id: 'sample',   name: 'sample',   xtype: 'textfield',   fieldLabel: 'Test field',
       renderTo: 'test'}
    The goal is to compose dynamically a json text and reuse it to dynamically build a component.
    But the Ext.decode throws an error.

    Here is the full code :
    Code:
    jsonConfig = "{" +
    "renderTo: 'test'," +
    "id: 'sample'," +
    "name: 'sample'," +
    "xtype: 'textfield'," +
    "fieldLabel: 'Test field'" +
    "}"
    
    
    var jsonCmp = Ext.decode(jsonConfig);
    The error type is 'non_object_property_load' in Chrome debugger.

  2. #2
    Sencha User
    Join Date
    Sep 2010
    Posts
    56
    Vote Rating
    1
    Bob Wilson is on a distinguished road

      0  

    Default Forget it....

    Forget it....


    My fault... It's not the Ext.decode which has a problem !
    'renderTo' is simply not applicable to a simple field.

    Is there a way to delete stupid posts ?

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,006
    Vote Rating
    650
    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


    Remove posts? No way... suffer
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Sencha User
    Join Date
    Sep 2010
    Posts
    56
    Vote Rating
    1
    Bob Wilson is on a distinguished road

      0  

    Default LOL

    LOL


    In french, there's an expression saying "Nobody's dead of being ridiculous".
    I don't know if there is an english equivalent.

Thread Participants: 1

Tags for this Thread