I am trying to use the sendmail.p example on a linux server using an appserver call.
The code is here: http://knowledgebase.progress.com/articles/Article/19647
I would like to let the wait-for be there til I get either an error or vStatus = 7 or vStatus <0, how can that be done?.
mysendmail.p:
:
run sendmail.
wait-for close of this-procdure. /* or wait-for "U1" of this-procedure.*/
procedure readHandler:
:
:
if vSate = 7 or vState<0 then apply "close" to this-procedure. /* or apply "U1" to this-procedure.*/
end.
I found a solution.... I put a repeat around the wait-for, and if vState ..... then return.
Got it :-)
I found a solution.... I put a repeat around the wait-for, and if vState ..... then return.
Got it :-)
I'm glad you're happy :-) but I don't get it. It seems to me you had the correct solution in the first place - apply the event your waiting for (I would suggest U1) when you get the condition you are looking for. With your solution, how do you get out of the WAIT-FOR such that you can repeat? Are you kicking it out before you get the correct status? Or is it the error case that's messing it up? What would happen if you got an error?
I added it like this:
:
REPEAT ON STOP UNDO, LEAVE ON QUIT UNDO, LEAVE:
IF vstate < 0 OR vstate = 7 THEN return.
WAIT-FOR close OF this-procedure.
END.
I am not sure how to do this with the event stuff, I never got it to work. Never the less, this is working swell :-)