读书人

急请高手帮忙!destroy 程序自动退出,该

发布时间: 2012-02-22 19:36:55 作者: rapoo

急,请高手帮忙!destroy 程序自动退出
在PB中建立custom class 对象uo_comm,uo_comm的constructor()事件代码如下:
this.visible=false
comm=create uo_pbcomm //uo_pbcomm 是另外一个custom class 对象
comm.of_setparent(this)

destructor()事件代码如下:
destroy comm


应中程序窗口W_BOM中引用对象uo_comm,当退出W_BOM窗口时程序自动退出.经调试,屏蔽 destructor()事件代码可避免上述问题,但同时又引起另外一个问题,应用程序退出没有任何反应,程序退不出来.

[解决办法]
在 destructor()事件里试下try,看能不能捕捉这个异常。

读书人网 >PB

热点推荐