please let me explain first one important thing how I'm working in VO.
Very often I have to share code between different applications, mostly between a GUI program and a Windows service, and I am doing this using external files that are used by more than one application in VO.
Now, I have started to combine applications that are running as VO applications and others that are running as X# applications.
Therefore I have the need to share prg files between VO and X# applications.
This works very well using even when X# needs "end class" statements that are not understand by VO:
Code: Select all
class CreateUpdateStatement inherit CreateStatement
method GetSQLString() class CreateUpdateStatement
local cStmt as string
local nLen as dword
local nI as dword
cStmt := ParmSubst( "update %1 set ", _cTableName ) + " "
nLen := ALen( _aFields )
for nI := 1 upto nLen - 1
cStmt += ParmSubst( "%1 = %2, ", _aFields[nI,1], self:FGStringSQL( _aFields[nI,2] ) )
next
cStmt += ParmSubst( "%1 = %2 ", _aFields[nLen,1], self:FGStringSQL( _aFields[nLen,2] ) )
return cStmt
method Init( cTableName ) class CreateUpdateStatement
super:Init( cTableName )
return self
#ifdef __XSHARP__
end class
#endifDo you have any idea how I could solve that?
Personally I could see several possibilities:
- XPorter recnognizes the end class that is present in the conditional compilation and does not creates a new one
- XPorter recognizes that the module is an external module in VO and optionally takes it "as is" and does nothing
- I could add some statement/comment for XPorter in the module so it leaves it "as is" without changing anything
Or maybe you have a better suggestion....
This is really in issue in migration because I'm doing that massively. The module where the sample code is taken is used by at least 10 different applications, and some of them are already in production in their X# version.
Wolfgang

