1. #1
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    965
    Vote Rating
    72
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default FieldSet.setTitle references non-existent initLegend method

    FieldSet.setTitle references non-existent initLegend method


    Looks like this class was reworked, and not tested.

    Assume the offending line can just be removed?

    Cheers,
    Westy
    Product Architect
    Altus Ltd.

  2. #2
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    965
    Vote Rating
    72
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default


    Heh, commented that out and now me.titleCmp is undefined...

    My override for now:
    Code:
    Ext.require('Ext.form.FieldSet',
        function() {
            Ext.override(Ext.form.FieldSet, {
                /**
                 * Override to remove call to non-existent method, and protect against titleCmp not being created yet:
                 * http://www.sencha.com/forum/showthread.php?171391-FieldSet.setTitle-references-non-existent-initLegend-method
                 */
                setTitle: function(title) {
                    var me = this;
                    me.title = title;
                    // me.initLegend();
                    if (me.titleCmp) {
                        me.titleCmp.update(title);
                    }
                    return me;
                }            
            })
        }
    );
    Product Architect
    Altus Ltd.