I've got the SecurityManager and requiredAppLogin working so that user
has to successfully login for the application to open, or else it
closes.
I have one connection information object. I create it in main.py, add
it to the application and then the user and password properties are set
in the subclassed
SecurityManager.
I also set the application MainFormClass to my main form
ScanDirectory.cdxml in main.py
I thought I should use the same connection for the main form, but when I
do that I get an error because the connection information doesn't
contain a
User name and password that will allow a successful connection to the
database. The main form gets instantiated and causes the error before
The login box is displayed and the correct user name and password are
passed to the connection information.
How should this be done?
Here's my main.py code.
import dabo
# subclassed dSecurityManager for this application
from aSecurityManager import aSecurityManager
dabo.ui.loadUI("wx")
app = dabo.dApp()
ci = dabo.db.dConnectInfo()
ci.DbType = "MySQL"
ci.Host = "localhost"
ci.User = ""
ci.PlainTextPassword = ""
ci.Database = "DirectoryInfo"
ci.Name = "MainConnect"
#add connection information object to the Application with the name of
MainConnnect
app.addConnectInfo(ci, "MainConnect")
#create subclassed security manager and register with application
# the connection information object is defined in the validation and
then passed to
# the application.
app.SecurityManager = aSecurityManager()
app.MainFormClass = "ScanDirectory.cdxml"
app.setup()
# IMPORTANT! Change app.MainFormClass value to the name
# of the form class that you want to run when your
# application starts up.
app.start()
Thanks.
Matthew Jackson
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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]