TriggerEvent()/Event()/PostEvent()有什么不同
在PB中经常要从一个事件中调用另外一个事件,常用的就是这几个函数
event把被调用事件放在最后面处理,可以带参数,也可以返回值,dynamic event()是其经典用法
注:Dynamic表示编译时指定事件可以不存在,系统把返回值类型检查推迟,到应用程序运行时进行。
triggerEvent触发指定对象的指定事件,是在事件队列的当前位置插入指定的事件,并且立即执行该事件中的脚本,它只能返回1,-1 或者空,带了long,word也比较麻烦
PostEvent在事件队列最后追加指定的事件,不是立即执行
-----
In PowerBuilder, there are several types of events.
System events with an ID:User actions or other system messages or a call in your scripts
System events without an