1. #1
    Sencha User Ronaldo's Avatar
    Join Date
    Jul 2007
    Location
    Enschede, The Netherlands
    Posts
    290
    Vote Rating
    0
    Ronaldo is on a distinguished road

      0  

    Default Destroy a form in ext 1.1 / Inheritance problem

    Destroy a form in ext 1.1 / Inheritance problem


    Hi all,

    As I load every page using ajax in a div, I'd like to remove everything just created before loading another page.
    Therefore, I register all my components, and call the destroy() method of each component when needed. Now I'm creating a form and I do not see a destroy() method for the Ext.form.Form... Is that because there's nothing to destroy()...?

    Anyway, I'd expect to have one, to remove/detach all fields in that form, and to remove all html elements again.

    So I set out to inherit the form and create a destroy method:

    Code:
    Ext.ux.Form = function(config){
         Ext.ux.Form.superclass.constructor.call(config);
    }
    
    Ext.extend(Ext.ux.Form, Ext.form.Form, {
        destroy : function() {
            alert('destroy form');
        }
    });
    But this code fails on the superclass construtctor call, as here the config is ok, but I stepped into toe superclass constructor (Ext.form.Form) and there the config is empty (undefined). Am I doing something wrong here? Am I missing something?

    The call to create the form is:

    Code:
    this.form = new Ext.ux.Form({
                labelAlign: 'right',
                labelWidth: 175,
                buttonAlign: 'right'
            });
    TIA
    Ronald

  2. #2
    Ext User
    Join Date
    Jun 2007
    Posts
    46
    Vote Rating
    0
    trbot is on a distinguished road

      0  

    Default


    Your call to the superclass constructor should be:
    Code:
    Ext.ux.Form.superclass.constructor.call(this, config);
    I had this exact same problem with undefined config. Turns out I needed to qualify scope as the first parameter. (even though it didn't appear in the signature of the method)

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi