-
9 Mar 2012 9:31 PM #1
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:
4. Generated code becomes:Code:{ groupFn: function(record) { return record.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:Code:grouper: { groupFn: function(record){ returnrecord.get('last_name').substr(0, 1); }, sortProperty: 'last_name' },
This:
Becomes:Code:custom_value = { something: this.someMethod('xx') }
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!Code:custom_value: '{\nsomething: this.someMethod(\'xx\')\n}'
-
10 Mar 2012 6:21 PM #2
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.
ThanksBharat Nagwani
Sencha Designer Development Team
-
10 Mar 2012 8:35 PM #3
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.
This duplicates another bug already reported in our system:
DSGNR-1543


Reply With Quote