查看单个帖子
旧 2009-05-04, 02:44 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】-setpathname90

->setpathname()
->setpathname()
i been using code below to update xrefpaths, this is working good.
try
{
odstring newxrefpath( userreferencepath );
pblock->upgradeopen();
pblock->setpathname( newxrefpath );
}
catch( oderror& e )
{
messagebox( null, svcs.geterrordescription( e.code() ), "", mb_ok );
}
but if i use exhostappservices::findfind() in my application(used for another part) the setpathname() will call findfile() with the existing ref path & filename. it can't be found so it throws a exception and does not update withthe new path name i want.
question: how can i make setpathname() work when myapplication also has findfile() ?
thank
cp
i have fixed the probalm by callingthe findfile() function in the parent class.
i wouldlike to returnthe same as the inbuilt findfile()
question: what does the parent class findfile() return sothat i can addthis to my virtual function so that the exception will not happen.
otherwise i have to have a boolean and decide whatto callin my findfile().
thx
cp
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)