John wrote:
> I'm having trouble working with the new code.
>
> 1. there is a blank form that appears behind the login dialog.
> Not a beig deal if I can close it - at least hide it.
You even see a blank form behind the login dialog when running
dSecurityManager.py
directly? I tried on Linux and Windows and don't see the extra form.
Are you sure you have set app.MainFormClass to None?
> 2. after a valid login I need to close the dialog along with the background
> mainform.
After a valid login, the login dialog is still visible? Again, are you seeing
this in
the test when running dSecurityManager.py directly?
> But attempting to close the background form also closed the entire app.
> Hiding sort of works
>
> 3. I need to display my form.
Displaying your form is demoed in the dSecurityManager test (replace your form
with
the dabo.ui.dFormMain() that I use in the test).
> The only way I could open my form was to use the following code.
This code looks good, except:
>
> if __name__ == "__main__":
> app = dabo.dApp()
change the above to:
app = dabo.dApp(MainFormClass=None)
> app.setup()
>
> class TestSM(dSecurityManager):
> def validateLogin(self, user, passwd):
> return True
> print user, passwd
> if user == "paul" and passwd == "23":
> return True
> return False
>
> app.SecurityManager = TestSM()
> app.Icon = "pes.ico"
> app.BasePrefKey = "PesED"
> app.setAppInfo("appName", "PES Education")
> app.setAppInfo("appShortName", "PES Education")
> app.setAppInfo("Icon", "pes.ico")
> app.AboutFormClass = PesAbout
>
> if app.SecurityManager.login():
> frm = MainForm()
> frm.show()
> app.start()
The rest looks good.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]