dabo Commit
Revision 4860
Date: 2008-12-17 10:58:17 -0800 (Wed, 17 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4860

Changed:
U   trunk/dabo/ui/dialogs/login.py

Log:
Fixed a number of bugs/problems with the login form.


Diff:
Modified: trunk/dabo/ui/dialogs/login.py
===================================================================
--- trunk/dabo/ui/dialogs/login.py      2008-12-17 18:52:27 UTC (rev 4859)
+++ trunk/dabo/ui/dialogs/login.py      2008-12-17 18:58:17 UTC (rev 4860)
@@ -54,7 +54,7 @@
                
 
        def addControls(self):
-               super(Login, self).afterInit()
+               self.super()
                
                self.addObject(lbl, 'lblUserName')
                self.addObject(txt, 'txtUserName')
@@ -103,25 +103,28 @@
                
                mainSizer.layout()
 
-               # Map enter key to accept button (because DefaultButton doesn't 
work):
-               self.bindKey("enter", self.onOK)
+               self.txtUserName.setFocus()
 
                
        def setMessage(self, message):
                self.lblMessage.Caption = message
                self.Sizer.layout()
                                
-       def onCancel(self, evt):
+       def runCancel(self):
                self.user, self.password = None, None
-               self.super(evt)
+               self.super()
                
-       def onOK(self, evt):
+       def onEnterKey(self, evt):
+               self.runOK()
+
+       def runOK(self):
                self.user, self.password = self.txtUserName.Value, 
self.txtPassword.Value
-               self.super(evt)
+               self.super()
                
                
 if __name__ == '__main__':
-       app = wx.PySimpleApp()
+       app = dabo.dApp(MainFormClass=None)
+       app.setup()
        form = Login(None)
        form.show()
        print form.user, form.password




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to