Sw4   >   Configuration   >   Startup Settings
The StudioWorks application's startup settings are controlled by the startupsettings.txt file located in the APP/startupitems folder.
The startupsettings.txt file is optional. You will only need to create the file if you want to change default settings, preset properties, or control the logon process of the end users.By default StudioWorks uses the last saved logon settings when an StudioWorks application is reopened. You can force an StudioWorks application to always use specific logon settings each time it is opened. To do so you add a logon property group to the APP/startupsettings.txt file.
The following are some examples of a logon properties group that could be added to the startupsettings.txt file.
Logon settings for logging onto an Omnis data file located in the user's APP/data folder.
logon {
damname = OMSQLDAM ;
hostname = APP/data/localdatafile ;
pingdatabase = FALSE ;
}
Logon Settings for logging on as the tables owner to a FrontBase database located on a server on the local area network.
logon {
damname = FRONTBASEDAM ;
hostname = 192.168.1.7 ;
databasename = LiveData ;
tablesownerlogon = TRUE ;
pingdatabase = TRUE ;
}
Be sure to include the ; semi-colon character after each property. The semi-colon is the delimiter.
An StudioWorks application can be configured to automatically sign-in the client when the main library is opened. The primary reason for having this feature is to be able to open a StudioWorks Omnis web application on a server without user intervention. The other reason you might do this is to save the user from needing to enter their name and password in the
window each time they open a low security application.To configure the StudioWorks application for auto sign-in you need to do two things:
To create the autosignin.txt file:
To modify the startupsetting.txt file:
constants {
autosignin = TRUE ;
}
Be sure to include the ; semi-colon character after each property. The semi-colon is the delimiter.
A StudioWorks application can be configured to run as an Omnis web server app.
When running on a web server, the StudioWorks application needs to startup without user intervention and in the event of an error the web app must not halt code execution with an OK message or a modal prompt window. Doing so would halt the Omnis application running on the server. HTTP requests being sent to the Omnis web app server would not be processed. The server administrator would need to use remote desktop software (VNC) to connect to the server, click the OK button, so that the code would continue. Not a good thing.
To configure an StudioWorks application to run as a web application need to modify the startupsetting.txt file:
constants {
autosignin = TRUE ;
appmode = web;
}
Be sure to include the ; semi-colon character after each property. The semi-colon is the delimiter.
With the appmode set to web the StudioWorks framework does the following when the application is opened:
You must also configure the Logon Settings and Auto Sign-In if you set the appmode to web.
If you are instantiating the oEmail object using the Startup_Task task variable eml you should set the applicable oConstants properties either by overridding and setting them manually in the oConstants object in your main library, or by setting them from the startupsettings.txt file.
To set the contants which apply to oEmail in your startupsettings.txt file you will need to include a constants group with properties and values as follows:
constants {
SysAdminEmailAddr = TheSysAdminEmailAddress ;
SysAdminFormalName = TheSysAdminFormalName ;
SMTPServer = TheSMTPServerName ;
}
Example properties and values:
constants {
SysAdminEmailAddr = support@vencor.ca ;
SysAdminFormalName = Vencor Support ;
SMTPServer = mail.vencor.ca ;
}
Alternately you can override the following methods in oConstants of your main library and return the values you want to use for your application.