1. #1
    Ext User everrich's Avatar
    Join Date
    Aug 2008
    Posts
    70
    Vote Rating
    0
    everrich is on a distinguished road

      0  

    Default About FireEvent

    About FireEvent


    In function AAA
    Code:
    AAA = function(){
    this.addEvents('event');
    }
    Ext.extend(AAA,Ext.util.Observable,{
    ....
     this.fireEvent('event',parameter);
    ....
    })
    in function BBB
    Code:
    function BBB {
    var aaa = new AAA();
    aaa.on('event',function(parameter){
    ...})
    }
    I have a problem with this code. Function AAA fireEvent , but Function BBB didn't catch and process event "event".
    I don't know why? I need your help. Thanks
    I'm sorry, my English is not so good.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,791
    Vote Rating
    599
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Post your actual code.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Your code is correct (although it would be better if you called the superclass constructor):
    Code:
    AAA = function(config){
    	this.addEvents('event');
    	AAA.superclass.constructor.call(this, config);
    }
    Ext.extend(AAA, Ext.util.Observable, {
    	test: function(parameter){
    		this.fireEvent('event', parameter);
    	}
    });
    var aaa = new AAA();
    aaa.on('event', function(parameter){
    	alert(parameter);
    });
    aaa.test('Hello');

Thread Participants: 2

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