> I don't understand why you are setting the value of the password textbox to the user name. > Paul
Just to see if you would spot the error :) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul McNett Sent: 30. januar 2008 18:39 To: Dabo developers' list Subject: Re: [dabo-dev] Login with default username Simen Haugen wrote: > Sorry, login.py should be like this (the other was just a test) > > > Index: login.py > =================================================================== > --- login.py (revision 3896) > +++ login.py (working copy) > @@ -106,6 +106,9 @@ > # Map enter key to accept button (because DefaultButton > doesn't work): > self.bindKey("enter", self.onOK) > > + def setUser(self, user): > + self.txtPassword.Value = user > + self.Sizer.layout() > > def setMessage(self, message): > self.lblMessage.Caption = message > > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Simen Haugen > Sent: 30. januar 2008 18:28 > To: Dabo developers' list > Subject: [dabo-dev] Login with default username > > I wanted a way of setting persisting the user name, so I added a default > user parameter. I don't think it will break anything, but I doubt it's > the dabo way of doing things. > > PS: In dApp.py, this also contains the self._finished = False so the > application doesn't crash when you fail to log in, but I'm not sure if > that's the place you want it... > > > > > Index: login.py > =================================================================== > --- login.py (revision 3896) > +++ login.py (working copy) > @@ -59,7 +59,7 @@ > self.addObject(lbl, 'lblUserName') > self.addObject(txt, 'txtUserName') > self.lblUserName.Caption = "User:" > - self.txtUserName.Value = "" > + self.txtUserName.Value = self._user > > self.addObject(lbl, 'lblPassword') > self.addObject(txtPass, 'txtPassword') > @@ -106,6 +106,9 @@ > # Map enter key to accept button (because DefaultButton > doesn't work): > self.bindKey("enter", self.onOK) > > + def setUser(self, user): > + self.txtPassword.Value = user > + self.Sizer.layout() > > def setMessage(self, message): > self.lblMessage.Caption = message > > > > Index: dApp.py > =================================================================== > --- dApp.py (revision 3896) > +++ dApp.py (working copy) > @@ -309,7 +309,8 @@ > # Convenience; if you don't need to customize > setup(), just > # call start() > self.setup() > - > + self._finished = True > + > if (not self.SecurityManager or not > self.SecurityManager.RequireAppLogin > or self.SecurityManager.login()): > > @@ -363,7 +364,7 @@ > self._projectInfo = (pth, nm) > > > - def getLoginInfo(self, message=None): > + def getLoginInfo(self, message=None, user=""): > """Return the user/password to dSecurityManager.login(). > > The default is to display the standard login dialog, and > return the > @@ -374,6 +375,7 @@ > """ > import dabo.ui.dialogs.login as login > ld = login.Login(self.MainForm) > + ld.setUser(user) > ld.setMessage(message) > ld.show() > user, password = ld.user, ld.password I don't understand why you are setting the value of the password textbox to the user name. Paul -- http://paulmcnett.com [excessive quoting removed by server] _______________________________________________ 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/dabo-dev/[EMAIL PROTECTED]
