zoukankan      html  css  js  c++  java
  • kbmMW 5.14 SmartBind TBindings.Clear遇到的一个问题

    procedure TForm3.Button1Click(Sender: TObject);
    begin
    FBindings := TkbmMWBindings.Create;
    FBindings.Bind(DisplayDataSet, 'f1', ListView1, '#Text1'); // error.
    FBindings.Bind(DisplayDataSet, 'f2', ListView1, '#Text2');
    FBindings.Bind(DisplaydataSet, '@', ListView1, '@', [mwboTwoWay]);
    FBindings.UpdateEvent.Activate(False);//当执行这句,则下面Clear方法出错
    FBindings.Clear; //An error occurred
    end;

    当前5.14版本,FBindings.UpdateEvent.Activate(False);这一句代码会造成下FBindings.Clear出错,已经提交给作者。

    昨晚提交的问题,今早作者就回复了,这是回复的原文:

    You were usually not supposed to deactivate the update event. Doing that release some internal resources which should only be released when the smart binding instance dies.
    
    However I can understand situations where one perhaps would like to pause the update event, why I have introduced a fix for next release.
    通常开发者不应该停用更新事件,这样做会释放一些内部资源,这些资源仅应在智能绑定实例死亡时才释放。
    
    但是,我可以理解某些情况下可能希望暂停更新事件的原因,所以,我将在下一版中修复这个部问题。 

    原来作者没有想到,我会这样调用:FBindings.UpdateEvent.Activate(False);

    上面是第一个问题,对于这样使用TkbmMWBindings类,还有一点,一定要自己释放他的实例,不然,退出应用时会出错的!

    期待下一个修正版本。

    2021-3-31:kbmMW 5.15.10解决了!

  • 相关阅读:
    SpringBoot: 2.SpringBoot整合servlet(转)
    SpringBoot: 1.创建第一个SpringBoot项目(转)
    SqlServer:SqlServer(服务器磁盘监控,创建管理员账号分配权,添加链接服务器,查询CPU,查询内存)
    Log parser工具使用
    目录爆破工具
    安装腾讯QQ问题记录
    Sql Server 2017 安装问题记录
    reGeorg+Proxifier使用
    Swaks
    python2.7 安装pycrypto库报错
  • 原文地址:https://www.cnblogs.com/kinglandsoft/p/14579228.html
Copyright © 2011-2022 走看看