I think that's because "this" has no Dialog.Confirm.  Dialog itself is
it's own object created via the library.  Maybe make a function for your
object that calls the Dialog.confirm with all your wanted parameters.

-ethan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Stes81
Sent: Friday, December 08, 2006 4:02 AM
To: [email protected]
Subject: [Javawin] reference problem "this"

hi guys,

got a problem with referencing ("this")

Im calling a function of my objectinstanze (LoginHandler) which is 
creating a dialog like that:

sendLogin: function(){

var ref= this;
Dialog.confirm($('login').innerHTML, {windowParameters: 
{className:"alphacube", width:400}, okLabel: "login", cancelLabel: 
"cancel",
        ok:function(win){
            var para = Form.serialize('myForm');
            this.loader1=new net.ContentLoader( url, 
function(){ref.checkLogin(this.req);},null, 'Post',para);          
        }
    });
}


checkLogin: fuction(){
    alert(this.loader1.req.responseText;);

}

with the following line I wanne initialize a loaderobject for my Object 
(LoginHandler) :


this.loader1=new net.ContentLoader( url, 
function(){ref.checkLogin(this.req);},null, 'Post',para);



the parameter:

function(){ref.checkLogin(this.req)

calls my function LoginHandler.checkLogin.. The Problem which I have, is

that the Object loader1 is not inside my LoginHandler.
I know that the loader1-Object is inside the Dialog-Object.

But if I'm using

this.Dialog.confirm(....

Its throwing an error.
So how is it possible to get access to my loader1?


_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to