Hi,

again, when using "this" you should write your code like this, the
problem is the asynchronous invoke of the method:


var myclass = function() {
    this.myvalue = "Michael";
}

Object.extend(myclass.prototype, {
    callback: function(res) {
        alert(this.myvalue + "  " + res.value);
    }
    call: function() {
         Namespace.Class.Method(1, 2, 3, 4, this.callback.bind(this));
    }
});


var x = new myclass();
x.myvalue = "Jan";
x.call();



Regards,
Michael














On 9/30/06, gjaume <[EMAIL PROTECTED]> wrote:
>
> The error is not here, the error is on "this.txtFilter" when the
> function is called the object LOSE the state and all properties like
> txtFilter ara lose.
>
>
> >
>


-- 
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/

Skype: callto:schwarz-interactive
MSN IM: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---

Reply via email to