Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    California
    Posts
    29
    Vote Rating
    1
    thejonz is on a distinguished road

      0  

    Default Unanswered: Pass a parameter to callback function in Architect?

    Unanswered: Pass a parameter to callback function in Architect?


    Is it possible to pass a parameter to a callback function (I need to be able to use 'this' in my callback method )?

    Here's my call (that isn't passing a parameter yet). I know I can make the callback function inline (and use a local variable that = this) but I call it all over so I'd rather not duplicate the code.

    workOrders.load(
    {
    params: {
    sessionID: sessionID,
    resNum: num
    },
    callback: this.displayWorkOrders
    });

  2. #2
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    California
    Posts
    29
    Vote Rating
    1
    thejonz is on a distinguished road

      0  

    Default How I solved this

    How I solved this


    ok, maybe there is a way to pass parameters to callback function but I haven't been able to find out how. In the meantime, this is how I solved my problem - I changed my callback function to an inline function and then have that callback function call another function. I like this because I don't have to duplicated the function that is now called in the callback everywhere.

    var that = this;

    workOrders.load(
    {
    params: {sessionID: sessionID, relatedResNum: resNum},
    callback: function(record, operation, success)
    {
    that.displayWorkOrders(record, operation, success, that);
    }
    });

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