当前位置: 代码迷 >> PB >> 程序报错,该怎么处理
  详细解决方案

程序报错,该怎么处理

热度:56   发布时间:2016-04-29 08:12:29.0
程序报错

if rb_15.checked =true then
ls_jtdzc =ls_jtdz +rb_15.text  
open(w_jtdzz)
close(parent)
end if 
if rb_16.checked =true then
ls_jtdzc =ls_jtdz +rb_16.text  
open(w_jtdzz)
close(parent)
end if 
if rb_17.checked =true then
ls_jtdzc =ls_jtdz +rb_17.text  
open(w_jtdzz)
close(parent)
end if
 
执行后出现报错:application terminated
  error:null object reference at line 6 in clicked event of object cb_1 of w_jtdzdzc

------解决方案--------------------
close(parent)
后面要加return !!
------解决方案--------------------
改写下代码:
if rb_15.checked then
ls_jtdzc =ls_jtdz +rb_15.text 
end if 
if rb_16.checked then 
ls_jtdzc =ls_jtdz+rb_16.text
end if 
if rb_17.checked then 
ls_jtdzc = ls_jtdz +rb_17.text
end if 
open(w_jtdzz)
close(parent)
  相关解决方案