秋·风

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  278 随笔 :: 0 文章 :: 308 评论 :: 20万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
Lazarus 4.0RC1/fpc3.3.1安装ehlib 10时出现以下出错:
EhLibReg.pas(761,27) Error: Incompatible type for arg no. 1: Got "Constant String", expected "LongInt"

原因:
lazarus 4.0rc1改变了Modified的定义
lazarus 4.0RC1之前的定义:

procedure TPropertyEditor.Modified(PropName: ShortString);
begin
  if PropertyHook <> nil then
    PropertyHook.Modified(Self, PropName);
end;

lazarus 4.0RC1之后改为:

复制代码
procedure TPropertyEditor.Modified(Index: integer);
var
  PropName: ShortString;
begin
  if PropertyHook = nil then exit;
  with FPropList^[Index] do begin
    if PropInfo<>nil then
      PropName:=PropInfo^.Name
    else
      PropName:='';
  end;
  PropertyHook.Modified(Self, PropName);
end; 
复制代码

出错的处理方法:

  if EditPropStorage(TPropStorageEh(Obj)) then
    Modified('StoredProps');

改为:

  if (EditPropStorage(TPropStorageEh(Obj))) and (ProperyHook<>nil) then
    PropertyHook.Modified(Self, 'StoredProps');

重新编译就可以正常安装ehlib.

 

posted on   秋·风  阅读(318)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示