<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Dear Sage,<br>
<br>
thank you very much for this. An adapted version is now in the
repository. <br>
Specifying a question mark "?" as password will still open a
dialog in order to hide passwords from observers, otherwise taken
over as provided.<br>
<br>
Best<br>
Felix<br>
<br>
<br>
</div>
<blockquote cite="mid:1407270457.629629390@f374.i.mail.ru"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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>
<a class="moz-txt-link-freetext" href="http://sage.com.ua/">http://sage.com.ua/</a></p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
<a class="moz-txt-link-abbreviated" href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems
<a class="moz-txt-link-freetext" href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a>
</pre>
</blockquote>
<br>
</body>
</html>