<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2018-08-13 11:16 GMT-04:00 T Lee Davidson <span dir="ltr"><<a href="mailto:t.lee.davidson@gmail.com" target="_blank">t.lee.davidson@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You create the printer object, open its port, write to the printer requesting a status report, and then *immediately* you <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
manually read the response. After that, for some odd reason, you read the "dataread" property twice, and then the program ends.<br></blockquote><div> ok but remove later those calls and does not triggered the read event!, inclusivelly if i put a loop in the main module that waiuth "something"<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

If you don't call the "rp" function, the program drops through the two "dataread" property reads and ends. When did you expect<br>
the _Read event would have a chance to be raised?<br></blockquote><div>was just a experiment, i removed in furter test as i said<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">
</span>Not sure exactly what you mean with that statement, but it may be the very idea I am trying to impress upon you. Your manual<br>
read subroutine gives the printer 500 milliseconds to respond. Why don't you give the Main module at least 500 milliseconds to<br>
allow the printer to respond and raise the _Read event?<br></blockquote><div>i put a loop into as i said in the previous paragraph, but still does not happened!<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Or, why not use a semaphore that is visible to the Main module and loop until the _Read event has had an opportunity to fill the<br>
"databuffer"?<br></blockquote><div>oh, of course was working in this way, was my first code, ok great but i wish to deal with the read event .. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">
</span>You may not have specified that the SerialPort stream should be watched, but it would be logical that Gambas automatically<br>
WATCHes a SerialPort in order to be be able to raise the _Read event. (<a href="http://gambaswiki.org/wiki/lang/open" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/<wbr>lang/open</a>)<br></blockquote><div> yeah yeah, when i said "hang at end" i mean that with gambas 3.8 when last sentence executed the programs ends normally, with 3.11 the programs "seems end" but the "play" button of the ide still are deactivate and the ide indicates program does not end...<br></div></div><br></div></div>