<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>1) Serial ports are almost never used these days so it's likely
      no one is able to test your code. </p>
    <div class="moz-forward-container">
      <p>2) Your description of what you want to do is very confusing. 
        Please remember that computer translators don't work very well
        for technical documents.  <br>
      </p>
      <p>3) Jussi is right.  You close the port before you read from
        it.  Of course there's nothing to read.</p>
      <p>4) You are getting stream errors, that's what 'cannot write,
        stream closed' is.</p>
      <p>5) Obviously, for stream to be closed, your open failed.  Your
        program never tests for a successful open.</p>
      <p>6) Open does not raise an error because your open code says not
        to: Try SComm.Open().  With the Try, Catch will never be called.</p>
      <p>7) In serial programming, direct reads from tty are best
        event-driven.  That way you can control the size of the buffer. 
        Oh yes, remember to remove read data from the buffer.<br>
      </p>
    </div>
    <br>
    <div class="moz-cite-prefix">On 2018-08-01 10:45 AM, PICCORO McKAY
      Lenz wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALci+FR+qXbaNe_dEgKT9WZ7mNewHnTCTAX2VRg2MfVLoFyeuQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">The problem is that you didn't read the context of
        the first email and the first email is translated with the
        "wonderful deepl translator" and by the answer from you its very
        bad them<br>
        <br>
        Explain that the main module is where I call the functions (I
        see the translator didn't place it very well), and once of thems
        are the close port ("$printdev.cp")<br>
        <br>
        I was must to read the English part before sent it, it is very
        badly translated, EVEN IF I REMOVE THE LINE THAT CLOSES THE PORT
        THE PRINT LINE DOES NOT OUT NOTHING, you can notice that it
        doesn't write anything when I try to print.<br>
        <br>
        I noted that many of the gambas forums are very dead, and only
        the gambas german book are alive, gambas resources are very
        limited, and i must finish hurry my requeriments so from any of
        you must understand when a people has some pression, i note when
        herbert said that want to swicht to python and i understand
        their problem.. it's the obvious result due the very limited
        resources..  i like to continue work with gambas but please dont
        make "too easy to do" (i pretentd to are sarcastid)<br>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature" data-smartmail="gmail_signature"><font
              color="#888888">Lenz McKAY Gerardo (PICCORO)</font>
            <div><font color="#888888"><a
                  href="http://qgqlochekone.blogspot.com"
                  target="_blank" moz-do-not-send="true">http://qgqlochekone.blogspot.com</a></font></div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">2018-08-01 10:19 GMT-04:00 Jussi
          Lahtinen <span dir="ltr"><<a
              href="mailto:jussi.lahtinen@gmail.com" target="_blank"
              moz-do-not-send="true">jussi.lahtinen@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>Not sure about that, but you certainly are the only
                one who do not know how to use spell checker or care
                enough to write understandable English.</div>
              <div>At least one problem in your code is because you
                close the stream and then try to read from it.</div>
              <div>The IDE has feature to run your project step by step.
                It's easy way to see the problem.<span class="HOEnZb"><font
                    color="#888888"><br>
                  </font></span></div>
              <span class="HOEnZb"><font color="#888888">
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>Jussi<br>
                  </div>
                </font></span></div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">
                <div>
                  <div class="h5">On Wed, Aug 1, 2018 at 4:46 PM,
                    PICCORO McKAY Lenz <span dir="ltr"><<a
                        href="mailto:mckaygerhard@gmail.com"
                        target="_blank" moz-do-not-send="true">mckaygerhard@gmail.com</a>></span>
                    wrote:<br>
                  </div>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div class="h5">
                      <div dir="ltr">
                        <div>i feel that i are the only that ask for
                          real problems or my questions are outside of
                          this world<br>
                          <br>
                        </div>
                        maybe i try inherits the common operations
                        inside each class and determine class type when
                        use the main class<br>
                      </div>
                      <div class="gmail_extra"><span><br clear="all">
                          <div>
                            <div
                              class="m_-9140844366016025855m_2432557364290736178gmail_signature"
                              data-smartmail="gmail_signature"><font
                                color="#888888">Lenz McKAY Gerardo
                                (PICCORO)</font>
                              <div><font color="#888888"><a
                                    href="http://qgqlochekone.blogspot.com"
                                    target="_blank"
                                    moz-do-not-send="true">http://qgqlochekone.blogspot.c<wbr>om</a></font></div>
                            </div>
                          </div>
                          <br>
                        </span>
                        <div>
                          <div class="m_-9140844366016025855h5">
                            <div class="gmail_quote">2018-07-31 17:15
                              GMT-04:00 PICCORO McKAY Lenz <span
                                dir="ltr"><<a
                                  href="mailto:mckaygerhard@gmail.com"
                                  target="_blank" moz-do-not-send="true">mckaygerhard@gmail.com</a>></span>:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">
                                <div dir="ltr">
                                  <div>
                                    <div>
                                      <div>hello, today I have another
                                        case, I want to implement
                                        inheritance to the common code
                                        with the serial port printing.<br>
                                        <br>
                                        What I want to do is to have the
                                        procedures to open, close and
                                        write to the serial port in one
                                        class, and two others that
                                        inherit these functions, then
                                        one of the inheritors writes "A"
                                        to the port while the other
                                        writes "B" to the port but the
                                        writing functions should be
                                        called the same... <br>
                                        <br>
                                      </div>
                                      i attached project with minimal
                                      comments hope someone will help
                                      with this!<br>
                                      <br>
                                    </div>
                                    the firts problem its that i
                                    received "'canot write "stream are
                                    closed"  why?<br>
                                    <br>
                                  </div>
                                  the second problem its that i cannot
                                  got any stream event when i do not
                                  have stream errors<br>
                                  <div>
                                    <div>
                                      <div><br clear="all">
                                        <div>
                                          <div
class="m_-9140844366016025855m_2432557364290736178m_2978823473671424557gmail_signature"><font
                                              color="#888888">Lenz McKAY
                                              Gerardo (PICCORO)</font>
                                            <div><font color="#888888"><a
href="http://qgqlochekone.blogspot.com" target="_blank"
                                                  moz-do-not-send="true">http://qgqlochekone.blogspot.c<wbr>om</a></font></div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                      <br>
                      <br>
                    </div>
                  </div>
                  <span class="">
                    ----[ Gambas mailing-list is hosted by <a
                      href="https://www.hostsharing.net"
                      rel="noreferrer" target="_blank"
                      moz-do-not-send="true">https://www.hostsharing.net</a>
                    ]----<br>
                    <br>
                  </span></blockquote>
              </div>
              <br>
            </div>
            <br>
            <br>
            ----[ Gambas mailing-list is hosted by <a
              href="https://www.hostsharing.net" rel="noreferrer"
              target="_blank" moz-do-not-send="true">https://www.hostsharing.net</a>
            ]----<br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
    </blockquote>
    <br>
  </body>
</html>