10.09.2014, 11:01 | #1 |
Участник
|
WinApi::fileExists2 и RunBaseBatch Help!!!
Dynamics AX 3.0, Build #1951.7609/514-193 SP3/OP023-71, СУБД Oracle 9
Доброго времени, помогите пожалуйста разобраться новичку . Суть проблемы: есть класс X++: class ExBase extends RunBaseBatch FilePath filePathDBF; #define.CurrentVersion(1) #define.Version1(1) #localmacro.CurrentList filePathDBF #endmacro далее на run класса ExBase передается filePathDBF параметром в другой класс X++: public void run() { DocExport docExp; ; docExp = new DocExport(this.getParam()) docExp.run(); // this.getParam() формирует Struct parmObj = new Struct(Types::String, "FilePath") } X++: final class DocExport { FilePath folderPath; #define.DBFName("1.txt") } X++: void new(Struct _parmObj) { folderPath = _parmObj.value("FilePath"); if ( substr(folderPath,strlen(folderPath),strlen(folderPath)) != '\\' ) folderPath = folderPath + '\\'; } X++: public boolean validate() { boolean ret = true; ; if ( !folderPath || !WinApi::fileExists2(folderPath + #DBFName)) ret = checkFailed(strFmt("Файл не найден по пути: %1",folderPath)); return ret; } |
|