The service provider state can be passed to the service requester directly in the event parameter of the update() method rather than as a separate call to getState().
服务提供者的状态可以作为 update() 方法的参数,直接传递给服务请求者,而不是单独调用 getState() 方法来获得服务提供者的状态。
This method is necessary if your manager implementation maintains separate listeners lists based on information that is captured in the event data.
如果管理器实现根据事件数据中捕获的信息维护单独的侦听器列表,则此方法是必需的。
For example, a button-click event and a menu-command-click event can both invoke the same delegate, which then calls a single method to handle these separate events the same way.
例如,单击按钮事件和单击菜单命令事件都能调用同一委托,然后该委托调用单个方法以相同方式处理各个事件。
应用推荐