1. #1
    Sencha User Phunky's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    341
    Vote Rating
    0
    Phunky is on a distinguished road

      0  

    Default [HELP] Understanding createCallback

    [HELP] Understanding createCallback


    I'm trying to get my head around createCallback but i'm getting a bit confused with it, i've assumed that it is possible to use createCallback to apply a callback to ANY function you create?

    So the following is how i think it works?

    Code:
    function shout(msg){
     Ext.Msg.alert('ALERT!', msg);
    }
    
    function run(){
     ds.load();
     ds.on('load', function(){ds.getAt(0)})
    }
    
    run().createCallback(shout('I wish i understood this'))
    Am i correct? or way off the mark?!

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    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


    Try:

    Code:
    function shout(msg){
     Ext.Msg.alert('ALERT!', msg);
    }
    
    function run(fn){
     ds.on('load', fn, null, {single:true});
     ds.load();
    }
    
    run(shout.createCallback('I wish i understood this'));

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