Anonymous user
Passing the workspace as a parameter: Difference between revisions
Passing the workspace as a parameter (view source)
Revision as of 15:18, 20 February 2008
, 20 February 2008→The cApplication subclass
Line 50: | Line 50: | ||
cmdline sCompanyFolder // get a parameter from the command line! | cmdline sCompanyFolder // get a parameter from the command line! | ||
If (sCompanyFolder="") Move "TRAINING" to scompanyfolder //default to traing db if execeuted without param | If (sCompanyFolder="") Move "TRAINING" to scompanyfolder //default to traing db if execeuted without param | ||
move (uppercase(sCompanyFolder)) to sCompanyFolder | move (uppercase(sCompanyFolder)) to sCompanyFolder | ||
Send DoOpenWorkspace (sCompanyFolder -".mApps121") //CURRENT$WORKSPACE | Send DoOpenWorkspace (sCompanyFolder -".mApps121") //CURRENT$WORKSPACE | ||
Get_Attribute DF_OPEN_PATH to sTemp | Get_Attribute DF_OPEN_PATH to sTemp | ||
// | //we use a file, REFNUM2, to contain info specific to this company | ||
Open refnum2 | Open refnum2 | ||
Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param | Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param from the company control file | ||
If (sTemp<>sCompanyFolder) Begin | If (sTemp<>sCompanyFolder) Begin | ||
Send stop_box ("Company ID mismatch in refnum2 file" * sCompanyFolder * sTemp) | Send stop_box ("Company ID mismatch in refnum2 file" * sCompanyFolder * sTemp) | ||
Abort //showstopper | Abort //showstopper | ||
End | End | ||
Set psCompanyFolder to sCompanyFolder | Set psCompanyFolder to sCompanyFolder | ||
//colour for visual clues | |||
Move (trim(refnumA2("COMPCOLR"))) to sTemp | Move (trim(refnumA2("COMPCOLR"))) to sTemp | ||
Set psCompanyColour to sTemp | Set psCompanyColour to sTemp | ||
//Formal Company Name | |||
Move (trim(RefNumA2("COMPANY"))) to sTemp | Move (trim(RefNumA2("COMPANY"))) to sTemp | ||
Set psCompany to sTemp | Set psCompany to sTemp | ||
//and much much more, you get the picture | |||
//.... | |||
Set peHelpType to htHtmlHelp | Set peHelpType to htHtmlHelp | ||
// | // |