Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-1306 in a recent build.
  1. #1
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    563
    Vote Rating
    26
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default [B1] [object] properties strips to many chars, like ' and "

    [B1] [object] properties strips to many chars, like ' and "


    Sencha Designer build 268.
    ExtJs 4.07A

    Im trying to configure a tips object.
    Ext.chart.series.Line.tips.

    In the properties I enter e.g
    Code:
    {
    	trackMouse: true,
    	width: 140,
    	height: 70,
    	renderer: function(storeItem,item) {
    		this.setTitle('Ugh');
    	}
    }
    However the result is without ' around Ugh
    Code:
    Ext.define('Dagsomsetning.view.base.MyLineSeries', {
        extend: 'Ext.chart.series.Line',
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                type: 'line',
                tips: {
                    trackMouse: true,
                    width: 140,
                    height: 70,
                    renderer: function(storeItem,
                    item){
                        this.setTitle(Ugh);
                    }
                },
                title: 'Ordre',
                xField: 'dato',
                yField: [
                    'ordresum'
                ],
                fill: true
            }, cfg)]);
        }
    });
    Also stripping spacing:
    Code:
    {
    	trackMouse: true,
    	width: 140,
    	height: 70,
    	renderer: function(storeItem,item) {
    		var ugh = 'ugh';
    		this.setTitle('Ugh');
    	}
    }
    To:
    Code:
    Ext.define('Dagsomsetning.view.base.MyLineSeries', {
        extend: 'Ext.chart.series.Line',
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                type: 'line',
                tips: {
                    trackMouse: true,
                    width: 140,
                    height: 70,
                    renderer: function(storeItem,
                    item){
                        varugh=ugh;this.setTitle(Ugh);
                    }
                },
                title: 'Ordre',
                xField: 'dato',
                yField: [
                    'ordresum'
                ],
                fill: true
            }, cfg)]);
        }
    });

    Some times the ' and " is included in the code, I've been unable to find the logic, but:
    Code:
    {
    	trackMouse: true,
    	width: 140,
    	height: 70,
    	renderer: function(storeItem, item)  {
    		this.setTitle(
    			Ext.Date.format(storeItem.get('dato'),"D d.m.Y") +
    			"<br />Ordre: " + Ext.util.Format.number(storeItem.get("ordresum"),"0.000/i") +
    			"<br />Fakturert: " + Ext.util.Format.number(storeItem.get("fakturasum"),"0.000/i")
    		);
    	}
    }
    "renders" to:
    Code:
    Ext.define('Dagsomsetning.view.base.MyLineSeries', {
        extend: 'Ext.chart.series.Line',
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                type: 'line',
                tips: {
                    trackMouse: true,
                    width: 140,
                    height: 70,
                    renderer: function(storeItem,
                    item){
                        this.setTitle(Ext.Date.format(storeItem.get(dato),
                        Dd.m.Y)+<br/>Ordre: ' + Ext.util.Format.number(storeItem.get('ordresum'),'0.000/i') +
    			'<br/>Fakturert: ' + Ext.util.Format.number(storeItem.get('fakturasum'),'0.000/i')
    		);
    	}
    },
                title: 'Ordre',
                xField: 'dato',
                yField: [
                    'ordresum'
                ],
                fill: true
            }, cfg)]);
        }
    });
    Last edited by svenna; 2 Feb 2012 at 8:11 AM. Reason: header typo
    Sven Tore Iversen

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

      0  

    Default


    Confirmed bug. Thanks

  3. #3
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    563
    Vote Rating
    26
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default


    I guess many people come across this bug, when doing think like configuring a grouper of a list.

    I found a workaround for the bug, that could be used in many of the situations that it occures.
    (I actually figured it out while writing this post, in frustration, to ask if anyone had found a work around yet)

    Since we are unable to have space after e.g. return (before variable name) we can only return "status" text - or concatenation text, starting with ''.

    So coding
    Code:
    {
    	groupFn : function(record) {
    		return record.get('navn')[0];
    	}
    }
    does not work, since it "compiles" to:
    Code:
    {
    	groupFn : function(record) {
    		returnrecord.get('navn')[
    			0
    		];
    	}
    }
    However coding:
    Code:
    {
    	groupFn : function(record) {
    		return '' + record.get('navn')[0];
    	}
    }
    Works, since it "compiles" to:
    Code:
    {
    	groupFn : function(record) {
    		return''+record.get('navn')[
    			0
    		];
    	}
    }

    So, this makes be able to code most of the configurations, and test functionallity, while waiting for the bug fix.

    Once fixed I will hopefully remember to remove ''+, but if I don't it's not the worst overhead you can have in an application
    Sven Tore Iversen

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    128
    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


    We have a bunch of enhancements regarding editing both templates and functions in the coming builds which will address your concerns here.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 2