ArtenSUITE
A Development Journal
Part 9: Startup Sequence
I’ve spent a few hours last night and this morning working on refining the startup and database logon procedure for ArtenSUITE. There are several complications and several paths with different outcomes and it is easy to end up with a convoluted, difficult to follow startup procedure. At the moment I am fairly happy with the startup procedure which works like this:
The app.Open Event is automatically called when the application launches. Within this method I have called a startup method which does the following by calling individual methods from within either the mCodeBaseSTD or mCodeBaseDB modules:
Displays a Splash Screen
Registers my MBS Plugins
Sets a property to show which platform the application is currently running on
Sets properties with the pathname to the Preferences file, the Errorlog file and the Sqlsession file
Sets properties containing network information, IP Address, Subnet, MAC Address Etc.
Checks for the existence of the Preferences file, Sets a Boolean property accordingly
if PrefsFileExists = TRUE
__Attempt to connect to the database
__if ConnectedProperty = True
____Enable the Continue Button on the Splash Screen
__if ConnectedProperty = False
____Display an Error Message
____Display the Preferences Window for Input
____Close Application
if PrefsFileExists = FALSE
__Display the Preferences Window for Input
__Close Application
The Splash screen, early version shown below, is displayed and when the ‘Continue’ button is depressed an event is triggered by the control which performs the following actions:
Check if a Default Company Record exists in the Database
If CompanyRecordExists,
__Close the Splash Window and Open the Logon Window for ID and Password Input
If CompanyRecordNOTExists then assume a new company needs setting up and open New Company Input Window
__Close Application
This sequence of events may well be refactored in the future but for now they logical, simple and work well :-)
"Even the most dangerous look less threatening when they are dead." - Laura Moncur
www.artenscience.co.uk
Honest Expert Independent Technology Advice for Business
Friday 8 August 2008
ArtenSUITE Part 9: Startup Sequence
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment