Passing the workspace as a parameter: Difference between revisions

m
Line 48: Line 48:
     Procedure OnCreate
     Procedure OnCreate
         String sCompanyFolder stemp Programname
         String sCompanyFolder stemp Programname
         cmdline sCompanyFolder
       
 
         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         
         //Showln sTemp
         //Showln sTemp
          
         //
         Open refnum2
         Open refnum2
         Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param form the correct company control file
         Move (trim(refnumA2("COMPFOLD"))) to sTemp //function to get a param form the correct company control file
   
        //
         If (sTemp<>sCompanyFolder) Begin
         If (sTemp<>sCompanyFolder) Begin
             Send stop_box ("Company ID mismatch in refnum2 file"  * sCompanyFolder * sTemp) //dont show, it would be a security weakness
             Send stop_box ("Company ID mismatch in refnum2 file"  * sCompanyFolder * sTemp) //dont show, it would be a security weakness
Line 76: Line 77:
          
          
         Set peHelpType to htHtmlHelp
         Set peHelpType to htHtmlHelp
 
        //
         Set pbEnterKeyAsTabKey to True
         Set pbEnterKeyAsTabKey to True
         Set psProduct to "KirkNet"
         Set psProduct to "KirkNet"