Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Problem

Status
Not open for further replies.

algomes

Programmer
Aug 2, 2002
20
PT
I've the folowing error :
1141 Cannot close window with active INPUT, DISPLAY ARRAY, or MENU statement.

but I'm not closing the window inside the input. Can anyone help me?
 
Hi:

Sounds like a logic problem. You'll have to post some code to get help.

Regards,

Ed
 
The main thread:

open window w_dtopos30 at 2,2 with form "dtenrguia" attribute(border)
call display_msg_dtopos(5)

call dtopos_l_leitura_nro_guia(ordem,"R")

close window w_dtopos30
call display_msg_dtopos(0)

-----------------------------------------------------------

#=========================================
function dtopos_l_leitura_nro_guia(ordem,tipopos)
#=========================================
define ordem smallint,
tipopos char(1) #Tipo de posicao

define tipodes char(9), #Tipo Descricao (E)ntrega, (R)ecolha, (D)evolucao, (A)r
rasto
nro_guia like dtpedido.pe_guia,
serie like dtpedido.pe_serieg,
ckdigit smallint,
posicao smallint, #No. do registo
tipo_ol char(1),
msg char(80)

let tipo_ol =tipopos
let nro_guia=null
let serie =null
let ckdigit =null
let posicao =Linha_c


while true

let tipodes =dtopos_tipodes(tipopos)
let int_flag=false

whenever error continue
input by name tipopos, tipodes, serie, nro_guia, ckdigit without defaults
before field tipopos
if tipo_ol is not null then
next field serie
end if

if nro_guia is not null or serie is not null then
next field serie
end if
after field tipopos
let tipodes=dtopos_tipodes(tipopos)
display by name tipodes
end input
if int_flag then exit while end if
whenever error call prt_error


-----------------------------------------------------------

int_flag is true when the user presses DEL (to cancel). This is when the application crashes.
 
algomes:

I can' see where you're really doing anything wrong. I won't be able to look at this for a couple of hours, but do you have DEFER INTERRUPT set?

Regards,

Ed
 
Thank's for answering Ed.
defer interrupt is set, it must be something else.
 
algomes:

I see what you're doing: input statement inside a while loop with the while loop terminated by pressing interrupt. (Incidentally and off topic - "whenever error call prt_error" is never executed because the while loop terminates).

I see nothing wrong, and I was unable to duplicated your problem using 4GL version 7.2 UD6 under Solaris both RDS and compiled. Of course, I don't have your exact schema and screen form, and I don't know what happens in function dtopos_tipodes. (You may have

You might try placing an AFTER INPUT block in your input statement and exit the input:

AFTER INPUT
IF int_flag
THEN
EXIT INPUT
END IF

This should close your input statement before the while loop terminates. Sorry I couldn't be more help.

Regards,


Ed
 
Thank's Ed. When I run it trough the debugger I can't replicate the error (the error occurs when I run the .4ge or the .4gi trough splgo). Do you think it may be an informix bug?
 
Yes, I do think you have found an informix bug. If you have informix tech support, I'd report it to them.

I take it the AFTER INPUT didn't work?

Ed
 
It didn't work. We solved it another way. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top