• TActionList.OnUpdate


    System.Actions.TContainedActionList.OnUpdate

    From RAD Studio API Documentation
     

    Delphi

    property OnUpdate: TActionEvent read FOnUpdate write FOnUpdate;
    

    C++

    __property System::Classes::TActionEvent OnUpdate = {read=FOnUpdate, write=FOnUpdate};
    

    Properties

    TypeVisibilitySourceUnitParent
    event protected
    System.Actions.pas
    System.Actions.hpp
    System.Actions TContainedActionList

    Description

    Occurs when the application is idle so that the action list can update a specific action in the list.

    Write an OnUpdate event handler to configure the properties of a specified action in the list so that it reflects current conditions.

    When the application is idle, it cycles through every action in turn, giving it a chance to update itself to reflect current conditions. For each action, the first event to occur in this sequence is the action list's OnUpdate event. If the OnUpdate event handler sets its Handled parameter to True, the action is considered updated, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class.

    If the OnUpdate event handler does not set its Handled parameter to True, the application's OnActionUpdate event occurs next. If the OnActionUpdate event does not update the action, the action object's OnUpdate event occurs. Finally, if the action does not have an OnUpdate event handler, the application executes any predefined update method implemented by the action object. 

    执行顺序

    1. If the OnUpdate event handler does not set its Handled parameter to True,
    2. the application's OnActionUpdate event occurs next.
    3. If the OnActionUpdate event does not update the action,
    4. the action object's OnUpdate event occurs. Finally,
    5. if the action does not have an OnUpdate event handler, the application executes any predefined update method implemented by the action object. 

    xe10生成的dll时,如果其内部中有窗体使用actionlist时,出现Kernelbase.dll错误 ,导致程序错误。

    原因就是Vcl.Actnlist=>Update函数=>SendAppMessage时造成,只要在上面OnUpdate中Handled设置为True就可以处理

    酒肉穿肠过 佛祖心中留 世人若学我 如同入魔道
  • 相关阅读:
    asp.net中读取带有加号(+)的Cookie,会自动把加号替换为空格
    简单实现分行输出的javascript代码
    大学我们应该做什么
    近日个人要闻
    WPF学习笔记“路由事件”一:路由事件基础
    WPF学习笔记“路由事件”二:路由事件基础
    WPF学习笔记“命令”三:执行命令
    WPF学习笔记“命令”二:命令库
    WPF学习笔记“命令”五:自定义高级命令的使用
    WPF学习笔记“布局”一:基础
  • 原文地址:https://www.cnblogs.com/jspdelphi/p/14746222.html
Copyright © 2020-2023  润新知