首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

程序报错,该怎么处理

2012-07-15 
程序报错if rb_15.checked true thenls_jtdzc ls_jtdz +rb_15.textopen(w_jtdzz)close(parent)end ifif

程序报错

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)

热点排行