This duplicates another bug already reported in our system: DSGNR-1543
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    pharix is on a distinguished road

      0  

    Default Custom property weird truncation

    Custom property weird truncation


    When setting a custom property on any component (i.e.: Store), if a line is longer than width of free-form textfield, it will truncate / strip out white spaces.

    Example scenario:

    1. Create a Store.

    2. Add custom property "grouper".

    3. Add the following into the value of grouper:
    Code:
    {
        groupFn: function(record) {
            return record.get('last_name').substr(0, 1);
        },
        sortProperty: 'last_name'
    }
    4. Generated code becomes:
    Code:
            grouper: {
                groupFn: function(record){
                    returnrecord.get('last_name').substr(0,
                    1);
                },
                sortProperty: 'last_name'
            },
    Also ... is there a nicer way to put in custom properties into components? The textbox is really tiny, and doesn't always treat the text I put into the box as "code", and instead it tries to convert it into a String:

    This:
    Code:
    custom_value = { something: this.someMethod('xx') }
    Becomes:
    Code:
    custom_value: '{\nsomething: this.someMethod(\'xx\')\n}'
    It's my first post, so I apologize if I'm not posting it right. Let me know if I should be posting both of the above issues separately or if I should be posting differently and I'll learn quick!

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Hi,

    You can add grouper from toolbox to the store and configure the groupFn config for the grouper.
    So you dont need a custom property.

    You bring up a good point of having better editor for custom properties and we will look into it.

    I will create a bug so that formatting for the function is handled correctly.

    Regarding "custom_value = { something: this.someMethod('xx') }"
    ensure this.someMethod can be resolved else it will be converted to string.

    Thanks
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    pharix is on a distinguished road

      0  

    Default


    Thanks for the guidance, bharatn!

    You guys did a great job at improving Designer and adding so many new things that I completely missed it. Thanks for pointing me to it.

    WRT:
    Code:
    custom_value = { something: this.someMethod('xx') }
    ... would it be at all possible to not have that "intelligence" and instead allow the developer to choose explicitly that they want something to be a string?

    Just a thought.

    Good job on the Designer so far.

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