起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 258|回复: 13

【结】公共组件库报错

[复制链接]
发表于 2008-9-4 13:09:32 | 显示全部楼层 |阅读模式
运行功能报错,报错指向
公共组件库(兼容性保留)
function TUserSystem.GetCurrentPersonMember: TOrgUnit;
begin
   Result := CurrentPosition.PersonMember;
end;

改写成
function TUserSystem.GetCurrentPersonMember: TOrgUnit;
var
lContextCurrent: Business.Model.TContextCurrent;
begin
  lContextCurrent := Business.Model.TContextCurrent.Create( ;) self.Context);
  Result := lContextCurrent.PersonMember;
end;
无法编译通过:[警告]Biz:\SYSTEM\BASEUSERINTERFACE\LIBS\COMMONCOMPONENTLIBRARY.LIBRARY.PAS(1336, 14): 方法 'TFileStrings.CompareStrings' 隐藏了前代类 'TStringList ' 的虚方法
[警告]Biz:\SYSTEM\BASEUSERINTERFACE\LIBS\COMMONCOMPONENTLIBRARY.LIBRARY.PAS(1337, 14): 方法 'TFileStrings.Find' 隐藏了前代类 'TStringList ' 的虚方法
[错误]Biz:\SYSTEM\BASEUSERINTERFACE\LIBS\COMMONCOMPONENTLIBRARY.LIBRARY.PAS(3695, 65): Undeclared identifier "Context"

请问该如何处理,我们很多流程都引用了这里
回复

使用道具 举报

发表于 2008-9-4 13:48:43 | 显示全部楼层
Business.Model.TContextCurrent.Create( ;) self.Context);
怎么这样写?
回复 支持 反对

使用道具 举报

发表于 2008-9-4 13:50:39 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-4 13:52:10 | 显示全部楼层
lContextCurrent := Business.Model.TContextCurrent.Create(Self.Context);
是写成这样的,编译不过去,刚才写帖子的时候写错了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-4 14:02:20 | 显示全部楼层
再次请教
lDeptURL := TCommonComponentLibrary.UserSystem.CurrentDept.BizURL.URL;
写成X3的用法,应该怎么改呢?
是不是原来引入公共组件库的地方,要改成引入组件库呢?
回复 支持 反对

使用道具 举报

发表于 2008-9-4 15:19:30 | 显示全部楼层
TUserSystem
中有FContext : TContext;你用他看看呢。
lContextCurrent := Business.Model.TContextCurrent.Create(FContext);
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-5 09:37:38 | 显示全部楼层
修改为:
procedure TPublicParamGroup.ParamDeptURLParamGetValue(Sender: TObject; var Value: Variant);
var
  lDeptURL, lDeptURLNoPrefix: string;

lContextCurrent: Business.Model.TContextCurrent;
begin
  lContextCurrent := Business.Model.TContextCurrent.Create(Self.Context);
  lDeptURL := lContextCurrent.Dept.BizURL.URL;
  //lDeptURL := TCommonComponentLibrary.UserSystem.CurrentDept.BizURL.URL;
  lDeptURLNoPrefix := FileSys.FileUtils.RemoveFilePrefix(lDeptURL);
  Value := lDeptURLNoPrefix;
end;

运行功能,会报隔离级为position的不存在,请问怎么处理
回复 支持 反对

使用道具 举报

发表于 2008-9-5 09:39:18 | 显示全部楼层
看一下你的参数组的隔离集是怎么设置的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-5 09:50:52 | 显示全部楼层
我设置的是全局的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-5 09:51:53 | 显示全部楼层
我试过取消隔离集,就不报错了。但原来引用参数进行自动填充的,都不灵了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-21 16:43 , Processed in 0.041461 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表