Re: Checking in

Jupiter Jones <[email protected]> Mon, 24 Feb 2025 12:04:24 +1100
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
--===============6542307736539583945==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_B828CD6B-085F-4F83-85BC-99B46DBA60FE"


--Apple-Mail=_B828CD6B-085F-4F83-85BC-99B46DBA60FE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Carl,

=46rom memory, you shouldn=E2=80=99t need to call updateRoot: on the =
libraries - I believe that=E2=80=99s handled automatically.=20

In any case, I just installed it to have a look and my educated guess =
was totally wrong :)

=46rom WAExternalFileLibraryTest-#setUp

fileSystem :=3D WAExternalFileLibrary new.
WADispatcher new register: fileSystem at: =E2=80=98culture'

I guess you might be able to set the directory to serve files from the =
UI, or maybe in code with something like=E2=80=A6

fileSystem preferenceAt: #directory put: =E2=80=98/path/to/files=E2=80=99

If you have no luck, I should have time to give this a go tonight or =
tomorrow.

> On 24 Feb 2025, at 10:47=E2=80=AFam, Carl G <[email protected]> =
wrote:
>=20
> Well, thanks for your help but no luck.   The trouble is that the =
WAExternalFileLibrary seems to be broken?  I dunno.  It throws an =
exception in this method:
>=20
> SeasideRenderLoopContinuation>>updateRoot: anHtmlRoot
>=20
>     | charSet |
>=20
>     charSet :=3D self application contentType charSet.
>=20
>     charSet isNil ifFalse: [
>=20
>         anHtmlRoot meta charset: charSet ].
>=20
>     anHtmlRoot beHtml5.
>=20
>     anHtmlRoot title: 'Seaside'.
>=20
>     self application libraries=20
>=20
>         do: [ :each | each default updateRoot: anHtmlRoot ].
>=20
>     self session updateRoot: anHtmlRoot
>=20
> It DNUs when it tried to send #default to the library.  I wonder if I =
can make my own subclass of WAFileLibrary and extend it to serve files =
from a disk folder.
>=20
> It's just puzzling that there isn't a ready made way to do this.  =
After WAExternalFileLibrary does work in Seaside 2.8.
>=20
> I was hoping to find an answer in the Seaside book at =
http://book.seaside.st/book but the web page is hug or something.  It =
was working a few days ago.
>=20
> Whose bell do I ring to get that rebooted?
>=20
> -Carl
>=20
>=20
> On Sun, Feb 23, 2025 at 5:23=E2=80=AFPM <[email protected] =
<mailto:[email protected]>> wrote:
>> Hi Carl,
>>=20
>> Disclaimer: I=E2=80=99ve never used a WAExternalFileLibrary so the =
following is an educated guess, but hopefully gives you enough info.
>>=20
>> I typically configure these kind of things on creation of the =
application with something like a #configureApplication: method on the =
class side of my root component...
>>=20
>> configureApplication: anApplication
>> 	anApplication preferenceAt: #sessionClass put: MySession.
>> 	anApplication configuration
>> 		addParent: MySystemConfiguration instance.
>> 	anApplication
>> 		addLibrary: WAExternalFileLibrary;
>> 		addLibrary: JQDevelopmentLibrary.
>> 	anApplication
>> 		preferenceAt: #directory put: =E2=80=98/path/to/serve/from=
=E2=80=99.
>>=20
>> Then call this method from the method that installs the web app=E2=80=A6=

>>=20
>> register
>> 	self configureApplication: (WAAdmin register: self =
asApplicationAt: =E2=80=98MyAppName')
>>=20
>> Cheers
>>=20
>>=20
>>=20
>>> On 24 Feb 2025, at 8:56=E2=80=AFam, Carl G <[email protected] =
<mailto:[email protected]>> wrote:
>>>=20
>>> I'm trying a few things trying to make my application serve static =
files.  Run BASIC dynamically generates PNG files that are rendered into =
the web page, but I cannot figure out how to make it work after hours of =
head banging.  The old version of Seaside allows me to add =
WAExternalFileLibrary in the configuration page.  But I cannot do this =
with Seaside 3.5.1 on VW for some reason.  If I try to do the following, =
I get a debugger when I launch the app.
>>>=20
>>>   (WADispatcher default handlers at: 'runbasicpersonal')=20
>>>     addLibrary: WAExternalFileLibrary
>>>=20
>>> If I substitute WAFileLibrary it doesn't blow up, but it doesn't =
seem to do anything either.  Putting a breakpoint in the handle: method =
for the instance of WAFileLibrary does not stop.  It seems that the =
WAFileLibrary is not being used.  My guess is that it's only for serving =
'files' that are in-memory anyways but I tried it just to see if I could =
anything work.
>>>=20
>>> Any ideas?  What the simplest possible way to add external file =
serving to my Seaside app?  I absolutely do not want my users to need =
Apache or something else.  The current version doesn't require it.
>>>=20
>>> Thanks in advance.
>>>=20
>>> -Carl Gundel, author of Run BASIC
>>> http://www.runbasic.com =
<http://www.runbasic.com/>_______________________________________________
>>> seaside mailing list -- [email protected] =
<mailto:[email protected]>
>>> To unsubscribe send an email to =
[email protected] =
<mailto:[email protected]>
>>=20
> _______________________________________________
> seaside mailing list -- [email protected]
> To unsubscribe send an email to =
[email protected]


--Apple-Mail=_B828CD6B-085F-4F83-85BC-99B46DBA60FE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;">Hi =
Carl,<div><br></div><div>=46rom memory, you shouldn=E2=80=99t need to =
call updateRoot: on the libraries - I believe that=E2=80=99s handled =
automatically.&nbsp;</div><div><br></div><div>In any case, I just =
installed it to have a look and my educated guess was totally wrong =
:)</div><div><br></div><div>From&nbsp;WAExternalFileLibraryTest-#setUp</di=
v><div><br></div><div><div>fileSystem :=3D WAExternalFileLibrary =
new.</div><div>WADispatcher new register: fileSystem at: =
=E2=80=98culture'</div><div><br></div><div>I guess you might be able to =
set the directory to serve files from the UI, or maybe in code with =
something like=E2=80=A6</div><div><br></div><div><span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);">fileSystem&nbsp;</span>preferenceAt: #directory put: =
=E2=80=98/path/to/files=E2=80=99</div><div><br></div><div>If you have no =
luck, I should have time to give this a go tonight or =
tomorrow.</div><div><br><blockquote type=3D"cite"><div>On 24 Feb 2025, =
at 10:47=E2=80=AFam, Carl G &lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><div dir=3D"ltr">Well, thanks =
for your help but no luck.&nbsp; &nbsp;The trouble is that the =
WAExternalFileLibrary seems to be broken?&nbsp; I dunno.&nbsp; It throws =
an exception in this method:<br><br><p><span =
style=3D"font-size:12px">SeasideRenderLoopContinuation&gt;&gt;updateRoot:&=
nbsp;</span><span style=3D"font-size:12px">anHtmlRoot</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">|</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">charSet</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">|</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">charSet</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">:=3D</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">self</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">application</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">contentType</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">charSet</span><span =
style=3D"font-size:12px">.</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">charSet</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">isNil</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">ifFalse:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">[</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
/span><span style=3D"font-size:12px">anHtmlRoot</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">meta</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">charset:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">charSet</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">]</span><span =
style=3D"font-size:12px">.</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">anHtmlRoot</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">beHtml5</span><span =
style=3D"font-size:12px">.</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">anHtmlRoot</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">title:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">'</span><span =
style=3D"font-size:12px">Seaside</span><span =
style=3D"font-size:12px">'</span><span =
style=3D"font-size:12px">.</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">self</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">application</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">libraries</span><span =
style=3D"font-size:12px">&nbsp;</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
/span><span style=3D"font-size:12px">do:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">[</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">:</span><span =
style=3D"font-size:12px">each</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">|</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">each</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">default</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">updateRoot:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">anHtmlRoot</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">]</span><span =
style=3D"font-size:12px">.</span></p><p><span =
style=3D"font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;</span><span =
style=3D"font-size:12px">self</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">session</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">updateRoot:</span><span =
style=3D"font-size:12px">&nbsp;</span><span =
style=3D"font-size:12px">anHtmlRoot</span></p><p><span =
style=3D"font-size:12px">It DNUs when it tried to send #default to the =
library.&nbsp; I wonder if I can make my own subclass of WAFileLibrary =
and extend it to serve files from a disk folder.</span></p><p>It's just =
puzzling that there isn't a ready made way to do this.&nbsp; After =
WAExternalFileLibrary does work in Seaside 2.8.</p><p>I was hoping to =
find an answer in the Seaside book at <a =
href=3D"http://book.seaside.st/book">http://book.seaside.st/book</a> but =
the web page is hug or something.&nbsp; It was working a few days =
ago.</p><p>Whose bell do I ring to get that =
rebooted?</p><p>-Carl</p></div><br><div class=3D"gmail_quote =
gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Feb =
23, 2025 at 5:23=E2=80=AFPM &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><div>Hi =
Carl,<div><br></div><div>Disclaimer: I=E2=80=99ve never used =
a&nbsp;<span style=3D"">WAExternalFileLibrary so the following is an =
educated guess, but hopefully gives you enough =
info.</span><br><div><br></div><div>I typically configure these kind of =
things on creation of the application with something like a =
#configureApplication: method on the class side of my root =
component...</div><div><br></div><div><div>configureApplication: =
anApplication</div><div><span style=3D"white-space:pre-wrap">	=
</span>anApplication preferenceAt: #sessionClass put: =
MySession.</div><div><span style=3D"white-space:pre-wrap">	=
</span>anApplication configuration</div><div><span =
style=3D"white-space:pre-wrap">		</span>addParent: =
MySystemConfiguration instance.</div><div><span =
style=3D"white-space:pre-wrap">	</span>anApplication</div><div><span =
style=3D"white-space:pre-wrap">		</span>addLibrary: =
WAExternalFileLibrary;</div><div><span style=3D"white-space:pre-wrap">		=
</span>addLibrary: JQDevelopmentLibrary.</div><div><span =
style=3D"white-space:pre-wrap">	</span>anApplication</div><div><span =
style=3D"white-space:pre-wrap">		</span>preferenceAt: #directory =
put: =E2=80=98/path/to/serve/from=E2=80=99.</div><div><br></div><div>Then =
call this method from the method that installs the web =
app=E2=80=A6</div><div><br></div><div><div>register</div><div><span =
style=3D"white-space:pre-wrap">	</span>self configureApplication: =
(WAAdmin register: self asApplicationAt: =
=E2=80=98MyAppName')</div></div><div><br></div><div>Cheers</div></div></di=
v><div><br></div><div><br></div><div><br><blockquote type=3D"cite" =
style=3D""><div>On 24 Feb 2025, at 8:56=E2=80=AFam, Carl G &lt;<a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; wrote:</div><br><div><div =
dir=3D"ltr">I'm trying a few things trying to make my application serve =
static files.&nbsp; Run BASIC dynamically generates PNG files that are =
rendered into the web page, but I cannot figure out how to make&nbsp;it =
work after hours of head banging.&nbsp; The old version of Seaside =
allows me to add WAExternalFileLibrary in the configuration page.&nbsp; =
But I cannot do this with Seaside 3.5.1 on VW for some reason.&nbsp; If =
I try to do the following, I get a debugger when I launch the =
app.<div><br></div><div>&nbsp; (WADispatcher default handlers at: =
'runbasicpersonal')&nbsp;<br>&nbsp; &nbsp; addLibrary: =
WAExternalFileLibrary<br><br></div><div>If I substitute WAFileLibrary it =
doesn't blow up, but it doesn't seem to do&nbsp;anything either.&nbsp; =
Putting a breakpoint in the handle: method for the instance of =
WAFileLibrary does not stop.&nbsp; It seems that the WAFileLibrary is =
not being used.&nbsp; My guess is that it's only for serving 'files' =
that are in-memory anyways but I tried it just to see if I could =
anything work.</div><div><br></div><div>Any ideas?&nbsp; What the =
simplest possible way to add external file serving to my Seaside =
app?&nbsp; I absolutely do not want my users to need Apache or something =
else.&nbsp; The current version doesn't require =
it.</div><div><br></div><div>Thanks in =
advance.</div><div><br></div><div>-Carl Gundel, author of Run =
BASIC</div><div><a href=3D"http://www.runbasic.com/" =
target=3D"_blank">http://www.runbasic.com</a></div></div>_________________=
______________________________<br>seaside mailing list -- <a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br>To =
unsubscribe send an email to <a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a><br></div></=
blockquote><br style=3D""></div></div></blockquote></div>
_______________________________________________<br>seaside mailing list =
-- [email protected]<br>To unsubscribe send an email to =
[email protected]<br></div></blockquote></div><br><=
/div></body></html>=

--Apple-Mail=_B828CD6B-085F-4F83-85BC-99B46DBA60FE--

--===============6542307736539583945==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
seaside mailing list -- [email protected]
To unsubscribe send an email to [email protected]

--===============6542307736539583945==--