hello there. i have the following class for login. (simplified)

------------------------------------------------------------------------------------------------------

qx.Class.define("qxgui.layout.LoginWindow",
{
    extend: qx.core.Object,
    type: "singleton",
    
    construct : function()
    {
        this.__widgets = {};
        
        // labels
        ...
        
        // input-felder
        ...
        
        // button
        ...
        
        this.__widgets["okbutton"].addListener( "click", function(e)
        {
            alert(this.__widgets["namefield"].getValue());
        });
        
        this.__createWindow();
    },
    
    members:
    {
        // eigenschaften
       
////////////////////////////////////////////////////////////////////////
        
        __window: null,
        __widgets: null,
        
        
        // methoden
       
////////////////////////////////////////////////////////////////////////
        
        /* login-fenster öffnen */
        openLoginWindow: function()
        {
            this.__window.add( this.__createForm() );
            this.__window.open();
            this.__window.center();
            
            var app = qx.core.Init.getApplication().getRoot();
            app.add( this.__window );
            
            /* automitisches zentrieren des fensters */
            app.addListener("resize", function(e)
            {
                this.center();
            },
            this.__window);
        },
        
        /* login-fenster erstellen */
        __createWindow: function( form )
        {
            this.__window = new qx.ui.window.Window("Login");
            this.__window.setLayout( new qx.ui.layout.Grow() );
            
            this.__window.setShowMaximize( false );
            this.__window.setShowMinimize( false );
            this.__window.setAllowMaximize(false);
            this.__window.setAllowMinimize(false);
            
            this.__window.setWidth(250);
            this.__window.setHeight(198);
            
            this.__window.setShowStatusbar(true);
            this.__window.setStatus("Status");
        },
        
        /* login-form erstelen */
        __createForm: function()
        {
            ...
            
            form.add( this.__widgets["namefield"], {row: 0, column : 1});
            form.add( this.__widgets["pwfield"], {row: 1, column : 1});
            form.add( this.__widgets["okbutton"], {row : 3, column : 1} );
            
            return form;
        }
    }
});

------------------------------------------------------------------------------------------------------

i get this error on "click":

this.__widgets is undefined
[Break on this error] alert(this.__widgets["namefield"].getValue());

the window shows up correctly, just the properties are not accessible for
some reason. maybe im just too tired today. ;) but i must admin that im not
an js-expert. coding for few days now.

thank you in advance! going to bed now ...

-- 
View this message in context: 
http://n2.nabble.com/am-i-blind--%28-promlems-while-accessing-properties-%29-tp2682771p2682771.html
Sent from the qooxdoo mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to