Hi

1) If I want a user to terminate an application what method should be 
called.  I was thinking of using an Exit Button in a window or toolbar 
that could be used to terminate the entire application.  Is this the 
proper way to shutdown a QooxDoo application.  If so do I just call the 
terminate method of the application?

2) On my windows I am planning to use protected members to hold 
references to child widgets.  Do these have to be disposed manually?  If 
so am I using the proper method as shown in my code below?

Thanks,
Simon

/*
#asset(dcbase/login16.png)
#asset(dcbase/login48.png)
#asset(dcbase/tooltip16.png)
#asset(dcbase/mnuexit.png)
#asset(dcbase/ChngPwd16.png)
*/

qx.Class.define("dcbase.frmLogin",
{
        extend : dcbase.frmModal,
        construct : function () {
                this.base(arguments,"Login","dcbase/login16.png");
                this.setShowStatusbar(true);
                this.setMinWidth(400);
                this.setMinHeight(300);
                this.setCaption("Login");
                this.setLayout(new qx.ui.layout.Grid(10,10));
                this.add(new qx.ui.basic.Image("dcbase/login48.png"),{row: 0, 
column: 0});
                this.getLayout().setColumnMinWidth(0,100);
                this.getLayout().setRowMinHeight(0,30);
                this.getLayout().setColumnAlign(1,"left","middle");
                this.getLayout().setColumnAlign(2,"center","top");
                this.add(new qx.ui.basic.Label("User: "),{row: 1, column: 1});
                this.__txtUser = new dcbase.txtStdPwd();
                this.__txtUser.setPlaceholder("Enter user name");
                this.__txtUser.setToolTipText("Enter your user name.");
                this.add(this.__txtUser ,{row: 1, column: 2});
                this.add(new qx.ui.basic.Label("Password: "),{row:2, column: 
1});
                this.StatusBarText = "Enter your password!!";
                this.__txtPwd = new dcbase.txtStdPwd();
                this.__txtPwd.setPlaceholder("Enter Password");
                this.__txtPwd.setToolTipText("Enter your password.");
                this.add(this.__txtPwd,{row:2, column: 2});
                this.__cmdLogin = new 
dcbase.btnStd("Login","dcbase/login16.png");
                this.__cmdLogin.setToolTipText("Click to login.");
                this.__cmdLogin.addListener("click",this.doLogin,this);
                this.add(this.__cmdLogin,{row: 3,column: 2});
                this.__cmdLogoff = new 
dcbase.btnStd("Logoff","dcbase/mnuexit.png");
                this.__cmdLogoff.setToolTipText("Click to logout of the 
application.");
                this.__cmdLogoff.addListener("click",this.doLogoff,this);
                this.add(this.__cmdLogoff,{row: 3,column: 1});
                this.__cmdChngPwd = new dcbase.btnStd("Change 
Password","dcbase/ChngPwd16.png");
                this.__cmdChngPwd.setToolTipText("Click to change your 
password.");
                this.__cmdChngPwd.addListener("click",this.doLogoff,this);
                this.add(this.__cmdChngPwd,{row: 5,column: 1,colSpan: 2});
        },
        destruct : function () {
         
this._disposeObjects("__txtUser","__txtPwd","__cmdLogin","__cmdChngPwd","__cmdLogoff");
                this.__txtUser = this.__txtPwd = this.__cmdLogin = 
this.__cmdChngPwd = 
this.__cmdLogoff = null;
        },
        members: {
                __txtUser: null,
                __txtPwd: null,
                __cmdLogin: null,
                doLogin: function (e) {
                        alert(this.__txtUser.getValue());
                },
                doLogoff: function (e) {
                        //qx.core.ObjectRegistry.shutdown();
                }
        }
});





------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to