Re: Checking in
Carl G <[email protected]> Sun, 23 Feb 2025 18:47:46 -0500
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <CAPYvR9fNXzDv8MAydd5apxa3r1VDefRtzOBh5G77RjhH=tuKTA@mail.gmail.com> |
--===============9014100085020941943==
Content-Type: multipart/alternative; boundary="00000000000074cb39062ed7da5d"
--00000000000074cb39062ed7da5d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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:
SeasideRenderLoopContinuation>>updateRoot: anHtmlRoot
| charSet |
charSet :=3D self application contentType charSet.
charSet isNil ifFalse: [
anHtmlRoot meta charset: charSet ].
anHtmlRoot beHtml5.
anHtmlRoot title: 'Seaside'.
self application libraries
do: [ :each | each default updateRoot: anHtmlRoot ].
self session updateRoot: anHtmlRoot
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.
It's just puzzling that there isn't a ready made way to do this. After
WAExternalFileLibrary does work in Seaside 2.8.
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.
Whose bell do I ring to get that rebooted?
-Carl
On Sun, Feb 23, 2025 at 5:23=E2=80=AFPM <[email protected]> wrote:
> Hi Carl,
>
> Disclaimer: I=E2=80=99ve never used a WAExternalFileLibrary so the follow=
ing is
> an educated guess, but hopefully gives you enough info.
>
> 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...
>
> 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.
>
> Then call this method from the method that installs the web app=E2=80=A6
>
> register
> self configureApplication: (WAAdmin register: self asApplicationAt:
> =E2=80=98MyAppName')
>
> Cheers
>
>
>
> On 24 Feb 2025, at 8:56=E2=80=AFam, Carl G <[email protected]> wrote:
>
> 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 WAExternalFileLibra=
ry
> 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.
>
> (WADispatcher default handlers at: 'runbasicpersonal')
> addLibrary: WAExternalFileLibrary
>
> 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 a=
re
> in-memory anyways but I tried it just to see if I could anything work.
>
> Any ideas? What the simplest possible way to add external file serving t=
o
> my Seaside app? I absolutely do not want my users to need Apache or
> something else. The current version doesn't require it.
>
> Thanks in advance.
>
> -Carl Gundel, author of Run BASIC
> http://www.runbasic.com
> _______________________________________________
> seaside mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
>
>
--00000000000074cb39062ed7da5d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Well, thanks for your help but no luck.=C2=A0 =C2=A0The tr=
ouble is that the WAExternalFileLibrary seems to be broken?=C2=A0 I dunno.=
=C2=A0 It throws an exception in this method:<br><br><p><span style=3D"font=
-size:12px">SeasideRenderLoopContinuation>>updateRoot:=C2=A0</span><s=
pan style=3D"font-size:12px">anHtmlRoot</span></p><p><span style=3D"font-si=
ze:12px">=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12px">|</s=
pan><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12=
px">charSet</span><span style=3D"font-size:12px">=C2=A0</span><span style=
=3D"font-size:12px">|</span></p><p><span style=3D"font-size:12px">=C2=A0=C2=
=A0=C2=A0=C2=A0</span><span style=3D"font-size:12px">charSet</span><span st=
yle=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12px">:=3D</sp=
an><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12p=
x">self</span><span style=3D"font-size:12px">=C2=A0</span><span style=3D"fo=
nt-size:12px">application</span><span style=3D"font-size:12px">=C2=A0</span=
><span style=3D"font-size:12px">contentType</span><span style=3D"font-size:=
12px">=C2=A0</span><span style=3D"font-size:12px">charSet</span><span style=
=3D"font-size:12px">.</span></p><p><span style=3D"font-size:12px">=C2=A0=C2=
=A0=C2=A0=C2=A0</span><span style=3D"font-size:12px">charSet</span><span st=
yle=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12px">isNil</s=
pan><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12=
px">ifFalse:</span><span style=3D"font-size:12px">=C2=A0</span><span style=
=3D"font-size:12px">[</span></p><p><span style=3D"font-size:12px">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12px=
">anHtmlRoot</span><span style=3D"font-size:12px">=C2=A0</span><span style=
=3D"font-size:12px">meta</span><span style=3D"font-size:12px">=C2=A0</span>=
<span style=3D"font-size:12px">charset:</span><span style=3D"font-size:12px=
">=C2=A0</span><span style=3D"font-size:12px">charSet</span><span style=3D"=
font-size:12px">=C2=A0</span><span style=3D"font-size:12px">]</span><span s=
tyle=3D"font-size:12px">.</span></p><p><span style=3D"font-size:12px">=C2=
=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12px">anHtmlRoot</span=
><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12px"=
>beHtml5</span><span style=3D"font-size:12px">.</span></p><p><span style=3D=
"font-size:12px">=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12=
px">anHtmlRoot</span><span style=3D"font-size:12px">=C2=A0</span><span styl=
e=3D"font-size:12px">title:</span><span style=3D"font-size:12px">=C2=A0</sp=
an><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"f=
ont-size:12px">.</span></p><p><span style=3D"font-size:12px">=C2=A0=C2=A0=
=C2=A0=C2=A0</span><span style=3D"font-size:12px">self</span><span style=3D=
"font-size:12px">=C2=A0</span><span style=3D"font-size:12px">application</s=
pan><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12=
px">libraries</span><span style=3D"font-size:12px">=C2=A0</span></p><p><spa=
n style=3D"font-size:12px">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
</span><span style=3D"font-size:12px">do:</span><span style=3D"font-size:12=
px">=C2=A0</span><span style=3D"font-size:12px">[</span><span style=3D"font=
-size:12px">=C2=A0</span><span style=3D"font-size:12px">:</span><span style=
=3D"font-size:12px">each</span><span style=3D"font-size:12px">=C2=A0</span>=
<span style=3D"font-size:12px">|</span><span style=3D"font-size:12px">=C2=
=A0</span><span style=3D"font-size:12px">each</span><span style=3D"font-siz=
e:12px">=C2=A0</span><span style=3D"font-size:12px">default</span><span sty=
le=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12px">updateRoo=
t:</span><span style=3D"font-size:12px">=C2=A0</span><span style=3D"font-si=
ze:12px">anHtmlRoot</span><span style=3D"font-size:12px">=C2=A0</span><span=
style=3D"font-size:12px">]</span><span style=3D"font-size:12px">.</span></=
p><p><span style=3D"font-size:12px">=C2=A0=C2=A0=C2=A0=C2=A0</span><span st=
yle=3D"font-size:12px">self</span><span style=3D"font-size:12px">=C2=A0</sp=
an><span style=3D"font-size:12px">session</span><span style=3D"font-size:12=
px">=C2=A0</span><span style=3D"font-size:12px">updateRoot:</span><span sty=
le=3D"font-size:12px">=C2=A0</span><span style=3D"font-size:12px">anHtmlRoo=
t</span></p><p><span style=3D"font-size:12px">It DNUs when it tried to send=
#default to the library.=C2=A0 I wonder if I can make my own subclass of W=
AFileLibrary 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.=C2=
=A0 After WAExternalFileLibrary does work in Seaside 2.8.</p><p>I was hopin=
g to find an answer in the Seaside book at <a href=3D"http://book.seaside.s=
t/book">http://book.seaside.st/book</a> but the web page is hug or somethin=
g.=C2=A0 It was working a few days ago.</p><p>Whose bell do I ring to get t=
hat rebooted?</p><p>-Carl</p></div><br><div class=3D"gmail_quote gmail_quot=
e_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Feb 23, 2025 at =
5:23=E2=80=AFPM <<a href=3D"mailto:[email protected]">terra.aus=
[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote"=
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex"><div>Hi Carl,<div><br></div><div>Disclaimer: I=E2=80=99ve =
never used a=C2=A0<span style=3D"color:rgb(0,0,0)">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: me=
thod on the class side of my root component...</div><div><br></div><div><di=
v>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 confi=
guration</div><div><span style=3D"white-space:pre-wrap"> </span>addParent:=
MySystemConfiguration instance.</div><div><span style=3D"white-space:pre-w=
rap"> </span>anApplication</div><div><span style=3D"white-space:pre-wrap"> =
</span>addLibrary: WAExternalFileLibrary;</div><div><span style=3D"white-s=
pace:pre-wrap"> </span>addLibrary: JQDevelopmentLibrary.</div><div><span s=
tyle=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><di=
v><div>register</div><div><span style=3D"white-space:pre-wrap"> </span>self=
configureApplication: (WAAdmin register: self asApplicationAt: =E2=80=98My=
AppName')</div></div><div><br></div><div>Cheers</div></div></div><div><=
br></div><div><br></div><div><br><blockquote type=3D"cite" style=3D"color:r=
gb(0,0,0)"><div>On 24 Feb 2025, at 8:56=E2=80=AFam, Carl G <<a href=3D"m=
ailto:[email protected]" target=3D"_blank">[email protected]</a>> =
wrote:</div><br><div><div dir=3D"ltr">I'm trying a few things trying to=
make my application serve static files.=C2=A0 Run BASIC dynamically genera=
tes PNG files that are rendered into the web page, but I cannot figure out =
how to make=C2=A0it work after hours of head banging.=C2=A0 The old version=
of Seaside allows me to add WAExternalFileLibrary in the configuration pag=
e.=C2=A0 But I cannot do this with Seaside 3.5.1 on VW for some reason.=C2=
=A0 If I try to do the following, I get a debugger when I launch the app.<d=
iv><br></div><div>=C2=A0 (WADispatcher default handlers at: 'runbasicpe=
rsonal')=C2=A0<br>=C2=A0 =C2=A0 addLibrary: WAExternalFileLibrary<br><b=
r></div><div>If I substitute WAFileLibrary it doesn't blow up, but it d=
oesn't seem to do=C2=A0anything either.=C2=A0 Putting a breakpoint in t=
he handle: method for the instance of WAFileLibrary does not stop.=C2=A0 It=
seems that the WAFileLibrary is not being used.=C2=A0 My guess is that it&=
#39;s only for serving 'files' that are in-memory anyways but I tri=
ed it just to see if I could anything work.</div><div><br></div><div>Any id=
eas?=C2=A0 What the simplest possible way to add external file serving to m=
y Seaside app?=C2=A0 I absolutely do not want my users to need Apache or so=
mething else.=C2=A0 The current version doesn't require it.</div><div><=
br></div><div>Thanks in advance.</div><div><br></div><div>-Carl Gundel, aut=
hor 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:seaside@lis=
ts.squeakfoundation.org" target=3D"_blank">[email protected]=
rg</a><br>To unsubscribe send an email to <a href=3D"mailto:seaside-leave@l=
ists.squeakfoundation.org" target=3D"_blank">[email protected]=
dation.org</a><br></div></blockquote><br style=3D"color:rgb(0,0,0)"></div><=
/div></blockquote></div>
--00000000000074cb39062ed7da5d--
--===============9014100085020941943==
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]
--===============9014100085020941943==--