I had to fix my XIDE plugin as in the last version the "Open BIN folder" don't worked anymore.
I had replaced:
Code: Select all
Project:BaseOutputFolder + Config:cSubFolder
Code: Select all
Path.Combine( Project:BaseOutputFolder, Config:cSubFolder )
Therefore I added now the following static function
Code: Select all
static method CombinePath( cPath1 as string, cPath2 as string ) as string
local cReturn as string
if cPath2:Length > 0 .and. cPath2[0] == Path.DirectorySeparatorChar
cReturn := Path.Combine( cPath1, cPath2:Substring( 1 ) )
else
cReturn := Path.Combine( cPath1, cPath2 )
endif
return cReturn
Wolfgang
P.S. I had to write also my own SubStr() extension method because I would not check the length every time.
Code: Select all
static method SubStr( self cString as string, nStart as int, nLen as int ) as string
// 0-based!!!
local nStringLen as int
local cReturn as string
nStringLen := cString:Length
if nStart < 0
if ( nStart * -1 ) >= nStringLen
nStart := 0
else
nStart := nStringLen + nStart
endif
endif
if nLen >= ( nStart + nStringLen )
cReturn := cString
else
cReturn := cString:Substring( nStart, nLen )
endif
return cReturn