Normal Topic Need Mode to ID Designer from RunTime running (Read 684 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Need Mode to ID Designer from RunTime running
Nov 24th, 2017 at 9:09pm
Print Post Print Post  

I am struggling to make different destination paths for Export and Import files when running in designer mode and RunTime time in the application.

Tests are OK in Designer mode, but fail in RunTime.
If I change paths to work in Runtime, then I cannot test the routines in designer mode.

Design work is frequently done on my local PC.  Then reconciled to application on customer Server.  But sometimes Designer is used on a customer workstation.  Workstations are mapped to a Share on the server, but the Drive letters are not recognized by the Server when going to relative paths in Client-Server mode.

Server 2012 has a Share identified as Sesame2. On the server it is the C:\Sesame2\ folder.
Sesame is installed on the \\Server\Sesame2\ folder
Work stations are mapped so Drive S goes to the share Sesame2 with a subfolder \Sesame2\Exports\

Cannot find a common path for both modes.  Need to make something like this:
Code
Select All
// Set vDataPath based on environment

// Designer/Runtime mode on my local workstation
If @DirectoryExists("C:\Sesame2\CustName") Then {
     vDataPath = "C:\Sesame2\CustName\Exports"
} ELSE {

// On customer network, local station
If @DirectoryExists("S:\Exports") Then {

     // Runtime mode on customer network, local station
     If @RuntimeMode Then {
          vDataPath = "Exports"
     } ELSE {

     // Designer mode on customer network, local station
     If @DesignerMode Then {
          vDataPath = "S:\Sesame2\Exports"
     } ELSE {
}

// None of above conditions exist
@MsgBox("Control folders not found.","","This may not be a valid setup.")
  



  
Back to top
 
IP Logged