Is serving files different in Pharo?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is serving files different in Pharo?

Mart-Mari Breedt
Hallo,

I have just install and started playing a bit with Pharo today. The
first thing I tried was to take one of my Seaside projects from Squeak
and see if I can get it going in Pharo? Everything went very smoothly,
except for the following annoying problem - which I - rather
embarrassingly - can't seem to figure out myself. Any
help/hints/pointers will be greatly appreciated.

For my Squeak/Seaside project I've subclassed WAKomEncoded and have
overridden the createService selector to allow for a custom entry point
and the ability to serve files from this point.

createService
        | basePath seaside assembly |
        basePath := 'encore'.
        seaside := self entryPoint: (WADispatcher default setName:
basePath).
        assembly := ModuleAssembly core.
        assembly serverRoot: FileDirectory default fullName.
        assembly alias: '/' , basePath to: [assembly addPlug: [:request
| seaside process: request]].
        assembly documentRoot: FileDirectory default fullName.
        assembly directoryIndex: 'index.html index.htm'.
        assembly serveFiles.

        ^ (HttpService startOn: port named: 'comanche') plug: assembly
rootModule; yourself.

The custom entry point still works fine, but for some strange reason
none of my files are served correctly. Is there a different approach to
serving files from within Pharo/Seaside that I should make use of?

I have downloaded and used this Pharo package:
pharo1.0-10491-rc1dev09.10.5.zip.
And installed these additional packages:

DynamicBindings-GiovanniCorriga.10.mcz
KomHttpServer-GiovanniCorriga.50.mcz
KomServices-gc.19.mcz
OSProcess-dtl.53.mcz
Seaside2.8a1-lr.594.mcz
Scriptaculous-lr.250.mcz
HTML5-mb.10.mcz

Thanks in advance!

Kind regards,

Mart-Mari




LTE USA ’09, 4-5 November  (non exhibitor)
Click mailto:[hidden email]?subject=LTE%20USA%20'09%20%20meeting%20request to book a meeting
 
AfricaCom’09, 11-12 November
stand C13, Cape Town, South Africa
Click mailto:[hidden email]?subject=AfricaCom%20meeting%20request to book a meeting

Disclaimer:
 
This e-mail message is confidential and should not be used by, or disclosed to, anyone except the addressee. If you receive this message in error, please advise the sender immediately.. Since e-mail transmission is not secure or error free, we do not accept responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your systems. You should therefore virus-check all attachments before opening. AIRCOM may monitor incoming and outgoing emails through its networks and by responding to this email, you consent to such monitoring. The views and opinions expressed in this e-mail are those of the author only and not of AIRCOM. We do not intend to enter into any legal commitments or contracts by e-mail.
P Save a tree. Don't print this e-mail unless it's really necessary

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Is serving files different in Pharo?

Mart-Mari Breedt
Hallo,

I got the answer to my problem here: http://bugs.squeak.org/view.php?id=7397

Kind regards,

Mart-Mari

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Mart-Mari Breedt
Sent: 29 October 2009 03:46 PM
To: [hidden email]
Subject: [Pharo-project] Is serving files different in Pharo?

Hallo,

I have just install and started playing a bit with Pharo today. The
first thing I tried was to take one of my Seaside projects from Squeak
and see if I can get it going in Pharo? Everything went very smoothly,
except for the following annoying problem - which I - rather
embarrassingly - can't seem to figure out myself. Any
help/hints/pointers will be greatly appreciated.

For my Squeak/Seaside project I've subclassed WAKomEncoded and have
overridden the createService selector to allow for a custom entry point
and the ability to serve files from this point.

createService
        | basePath seaside assembly |
        basePath := 'encore'.
        seaside := self entryPoint: (WADispatcher default setName:
basePath).
        assembly := ModuleAssembly core.
        assembly serverRoot: FileDirectory default fullName.
        assembly alias: '/' , basePath to: [assembly addPlug: [:request
| seaside process: request]].
        assembly documentRoot: FileDirectory default fullName.
        assembly directoryIndex: 'index.html index.htm'.
        assembly serveFiles.

        ^ (HttpService startOn: port named: 'comanche') plug: assembly
rootModule; yourself.

The custom entry point still works fine, but for some strange reason
none of my files are served correctly. Is there a different approach to
serving files from within Pharo/Seaside that I should make use of?

I have downloaded and used this Pharo package:
pharo1.0-10491-rc1dev09.10.5.zip.
And installed these additional packages:

DynamicBindings-GiovanniCorriga.10.mcz
KomHttpServer-GiovanniCorriga.50.mcz
KomServices-gc.19.mcz
OSProcess-dtl.53.mcz
Seaside2.8a1-lr.594.mcz
Scriptaculous-lr.250.mcz
HTML5-mb.10.mcz

Thanks in advance!

Kind regards,

Mart-Mari



LTE USA ’09, 4-5 November  (non exhibitor)
Click mailto:[hidden email]?subject=LTE%20USA%20'09%20%20meeting%20request to book a meeting
 
AfricaCom’09, 11-12 November
stand C13, Cape Town, South Africa
Click mailto:[hidden email]?subject=AfricaCom%20meeting%20request to book a meeting
 
Disclaimer:
 
This e-mail message is confidential and should not be used by, or disclosed to, anyone except the addressee. If you receive this message in error, please advise the sender immediately.. Since e-mail transmission is not secure or error free, we do not accept responsibility for changes to any e-mail which occur after it has been sent. Attachments to this e-mail may contain software viruses which could damage your systems. You should therefore virus-check all attachments before opening. AIRCOM may monitor incoming and outgoing emails through its networks and by responding to this email, you consent to such monitoring. The views and opinions expressed in this e-mail are those of the author only and not of AIRCOM. We do not intend to enter into any legal commitments or contracts by e-mail.
P Save a tree. Don't print this e-mail unless it's really necessary

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project