当前位置: 代码迷 >> PB >> halt 和halt close的区别解决方案
  详细解决方案

halt 和halt close的区别解决方案

热度:90   发布时间:2016-04-29 06:04:56.0
halt 和halt close的区别
请教高手,halt 和halt close究竟有何区别,能说得详细点嘛,千恩万谢~\(≧▽≦)/~啦啦啦
------解决方案--------------------
halt close 需要执行窗口和应用的close事件

halt 直接退出程序

我的理解
------解决方案--------------------
halt 直接结束应用程序

halt close 会执行application对象中的Close 事件的代码,会在结束应用程序,前释放所有的实例

------解决方案--------------------
如果只使用halt,系统直接中止应用,可能会出现对象未正常释放的情况
而halt close会正常关闭主线程,这样的话application的close事件也会正常执行,所以halt应该尽量不用,推荐使用halt close
------解决方案--------------------
When PowerBuilder encounters Halt without the keyword CLOSE, it immediately terminates the application. 
When PowerBuilder encounters Halt with the keyword CLOSE, it immediately executes the script for the Close event for the application and then terminates the application. If there is no script for the Close event at the application level, PowerBuilder immediately terminates the application
------解决方案--------------------
F1帮你搞定许许多多的问题 包括 halt(close)
  相关解决方案