-
14 Dec 2011 2:45 PM #11
ryanrca -
THanks much for the project file and sample.
Can you please repost the json file in plain text format? It's currently whatever your browser interpreted.Aaron Conran
@aconran
Sencha Architect Development Team
-
14 Dec 2011 3:25 PM #12
oops, attached here is the JSON in the raw...
-
15 Dec 2011 9:33 AM #13
I'd also like to emphatically state that I didn't create that solution and I'm not responsible for any best practice violations that might be found therein...

-
21 Dec 2011 6:15 AM #14
Javascript function calls in template values causing crash
Javascript function calls in template values causing crash
I've found a (the?) source of our Designer "TypeError: 'undefined' is not an object" crashes. We use grid templatecolumns similar to the one below throughout our projects:
tpl: '<span class="{[(values.SafetyManagerStatusName.toLowerCase() != "closed") ? "negative" : "positive"]}">{SafetyManagerStatusName}</span>'
It seems that Designer is trying to interpret the .toLowerCase() call when the class is rendered in the design view. Since we create and bind our stores in the code behinds (as opposed to stores created in the Designer) the data value would appear to be null at design time, causing the error.
I'd call this a Designer bug, but regardless, is there a better way to handle the template scenario I've given?
FIXED: I came up with a fix for this particular issue. Converting the values.ColumnName value to a string first and then converting toLowerCase results in a text string of "undefined" rather than chucking an undefined reference error. See below:
tpl: '<span class="{[(String(values.SafetyManagerStatusName).toLowerCase() != "closed") ? "negative" : "positive"]}">{SafetyManagerStatusName}</span>'Last edited by deaconb; 21 Dec 2011 at 9:58 AM. Reason: Added fix
-
22 May 2012 4:25 PM #15
ryanrca,
I am able to open your project fine in Ext Designer 1.2.2. Since we are not fixing any issues in 1.1 could you upgrade to 1.2.2.
ThanksBharat Nagwani
Sencha Designer Development Team
Success! Looks like we've fixed this one. According to our records the fix was applied for
DSIGNERONE-12
in
a recent build.


Reply With Quote