Success! Looks like we've fixed this one. According to our records the fix was applied for DSIGNERONE-12 in a recent build.
  1. #11
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    140
    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

    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

  2. #12
    Sencha User
    Join Date
    Sep 2010
    Posts
    13
    Vote Rating
    0
    ryanrca is on a distinguished road

      0  

    Default

    oops, attached here is the JSON in the raw...
    Attached Files

  3. #13
    Sencha User
    Join Date
    Dec 2009
    Posts
    5
    Vote Rating
    0
    deaconb is on a distinguished road

      0  

    Default

    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...

  4. #14
    Sencha User
    Join Date
    Dec 2009
    Posts
    5
    Vote Rating
    0
    deaconb is on a distinguished road

      0  

    Exclamation 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

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

      0  

    Default

    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.

    Thanks
    Bharat Nagwani
    Sencha Designer Development Team