<HTML><BODY><p><br>Hi Oberon Comunity!<br></p><p>There is a small inconsistency in A2's VNC.Open command. It actually makes impossible for A2 newbies to use both of VNC examples present in system (VNCTetrisServer and WMVNCView).</p><p>Both examples by default does not require password for connection establishing, but VNC.Open at first incorrectly handles password omission in command line and at second on password omission requests password through the dialog and finishes with error if user will omit it again in the dialog. And at third this behaviour even does not correspond to syntax presented to user by message "Error: expected server[ pwd] port".<br data-mce-bogus="1"></p><p>Correct code, probably, will be following:<br></p><p>PROCEDURE Open*(context : Commands.Context);        (** server[ pwd] port *)<br>VAR<br>        server: IP.Adr; res, port: LONGINT;<br>        c: Connection; pwd: ARRAY 32 OF CHAR; svr, title: ARRAY 128 OF CHAR;<br>BEGIN<br>        context.arg.SkipWhitespace; context.arg.String(svr); context.arg.SkipWhitespace;<br>        IF (context.arg.Peek() < "0") OR (context.arg.Peek() > "9") THEN context.arg.String(pwd) END;<br>        context.arg.SkipWhitespace; context.arg.Int(port, FALSE);<br>        IF (context.arg.res = Streams.Ok) OR (context.arg.res = Streams.EOF) THEN<br>                DNS.HostByName(svr, server, res);<br>                IF (res = Ok) & (port # 0) THEN<br>                        NEW(c);<br>                        OpenVNC(c, server, port, pwd);<br>                        IF c.res = Ok THEN<br>                                pool.Add(c);<br>                                COPY(svr, title); Files.AppendStr(" Port ", title); Files.AppendInt(port, title); Files.AppendStr(" - VNC ", title); Files.AppendInt(c.id, title);<br>                                c.w.SetTitle(WMWindowManager.NewString(title));<br>                                Show(context)<br>                        ELSE<br>                                context.error.String("Error "); context.error.Int(c.res, 1); context.error.Ln<br>                        END<br>                ELSE<br>                        context.error.String("Error: not found"); context.error.Ln<br>                END<br>        ELSE<br>                context.error.String("Error: expected server[ pwd] port"); context.error.Ln<br>        END;<br>END Open;</p><p><br>---<br>Cheers, SAGE<br>http://sage.com.ua/</p></BODY></HTML>