You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    pblanchardie is on a distinguished road

      0  

    Default Unable to add custom object (listConfig) - quotes are added

    Unable to add custom object (listConfig) - quotes are added


    REQUIRED INFORMATION




    Architect Build tested:
    • Build: 640


    Project Type:
    • ExtJS 4.x


    Description:
    • When I add a "listConfig" custom propery to a combobox, select "Object" as the type, the object code is treated like a String by architect: quotes are added and new-lines get replaced by \r\n.


    Steps to reproduce the problem:
    add a "listConfig" custom propery to a combobox, select "Object" as the type, then write code


    The result that was expected:
    the code as it were typed as the value of the property


    The result that occurs instead:
    a string


    HELPFUL INFORMATION




    Screenshot, Project, or Video:


    Possible fix:


    Operating System:

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,851
    Vote Rating
    58
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Objects get stringified when they don't evaluate to real objects. In future version of Architect we do a better job of telling you this but for now it being a string and not an object is the only indication.

    Objects should all be surrounded by curly braces
    {
    ...
    }

    for instance
    {
    a: 1

    note there is no ending curly brace would be stringified
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    pblanchardie is on a distinguished road

      0  

    Default


    Hi

    Objects get stringified even when they are real objects, and surrounded with {}

    Try with that, and you'll see the bug:
    Code:
    {
                                    loadingText:i18n.patient_searching,
                                    emptyText:i18n.patient_empty_result,
    
    
                                    // Custom rendering template for each item
                                    getInnerTpl:function () {
                                        return '[{userName}] {lastName} {firstName} ';
                                    }
                                }
    Regards

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,087
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Raw JavaScript references variables etc are not possible at this time. They must be implemented via overrides. We are aware of this and working to fix it in the next minor version.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 2