<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Mark,<br>
<br>
In Worspaces, variables not declared between vertical vars are
"Workspace Variables" and live until the Workspace is closed.<br>
In methods, variables declared as temporaries, between vertical
vars, may be garbage collected anytime after the method exits,
unless there is some other reference to the contents.<br>
<br>
So, yes. It is very possible that that's the difference.<br>
<br>
Cheers,<br>
<br>
On 6/12/2024 11:27 AM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnV-yja7md1BFHBj2C+-M2s5aRCQ3Rf_Pd4f1VDHUm02QQ@mail.gmail.com"
type="cite">
<div dir="ltr">Is it possible the issue is that when I run the
code from a Workspace, the server does not get garbage
collected, but when I run it from within the `initialize`
method, it does get garbage collected?</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jun 11, 2024 at
8:42 PM Mark Volkmann <<a moz-do-not-send="true"
href="mailto:r.mark.volkmann@gmail.com">r.mark.volkmann@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">I created a class named `MyWebServer` and added
this `initialize` method.
<div><br>
</div>
<div><font face="monospace">initialize<br>
"demonstrates using the WebServer class"<br>
<br>
server := WebServer new listenOn: 1961.<br>
server addService: '/' action: [ :req | req
send200Response: 'Home Page' ].<br>
server addService: '/hello' action: [ :req | req
send200Response: 'Hello World!' ]</font><br>
</div>
<div><br>
</div>
<div>Then I entered this in a Workspace and ran "Do it":</div>
<div><br>
</div>
<div><font face="monospace">MyWebServer new</font></div>
<div><br>
</div>
<div>This started a process named "WebServer's listener
process" that I see in a Process Browser window.</div>
<div><br>
</div>
<div>If I browse localhost:1961, the browser just hangs. But
if I enter that same code in a Workspace, both routes work
fine.</div>
<div>What am I missing?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jun 11, 2024 at
7:24 PM Mark Volkmann <<a moz-do-not-send="true"
href="mailto:r.mark.volkmann@gmail.com" target="_blank">r.mark.volkmann@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">Thank you so much! This is exactly what I
was looking for.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jun 11, 2024
at 1:05 AM Bernhard Pieber via Cuis-dev <<a
moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px
0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">Feature require: 'WebClient'.<br>
<br>
See class WebServer<br>
<br>
Cheers,<br>
Bernhard<br>
<br>
<br>
> Am 10.06.2024 um 14:39 schrieb Mark Volkmann via
Cuis-dev <<a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>:<br>
> <br>
> Can someone recommend a package I should look at
to learn about implementing HTTP endpoints in Cuis?<br>
> <br>
> ---<br>
> R. Mark Volkmann<br>
> Object Computing, Inc.<br>
> --<br>
> Cuis-dev mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
> <a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
<br>
<br>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica,
sans-serif">R. Mark Volkmann</font></div>
<div><span style="font-size: 12.8px;"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size: 12.8px;"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size: 12.8px;"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>