osdir.com
mailing list archive

Subject: Re: inserting images with Seaside - msg#00177

List: lang.smalltalk.squeak.beginners

Date: Prev Next Index Thread: Prev Next Index
David,
I figured it out, thanks to your deduction that it was a path problem. But since I'd set '/seaside' as an alias, I had to give '../photo.jpg' as the path I.e., I had to direct the browser to look in the document Root not the aliased path to my image with the ../ relative path prefix. Anyway, thanks for your help.

Tom Keller

On 7/24/06, Thomas Keller <thokeller@xxxxxxxxx> wrote: Thanks for your help. But I'm still confused about the directory tree being used. My files are in this hierarchy:
- MySqueak (dir)
    - Squeak3.8-TJK.image
    - Resources (dir)
        - Cybele-photo01.jpg

What I understand your message to mean is that the documentRoot object contains static files that I can render without additional path information. So an image in Resources should render just by giving its filename. So I tried
html image: 'Cybele-photo01.jpg' altText: 'Cybele photo'.
This gives
Error: "/seaside/Cybele-photo01.jpg" not found.

Since that didn't render the image, I tried:
html image: 'Resources/Cybele- photo01.jpg' altText: 'Cybele photo'.
But also gives the not found error.
Error: "/seaside/Resources/Cybele-photo01.jpg" not found.

So at this point I'm stumped. I'm sure it's a trivial config issue. I'll keep working through the tutorial.

Thanks again.
Tom Keller

Also, the a
On 7/22/06, David Shaffer < cdshaffer@xxxxxxx> wrote: Thomas Keller wrote:

> [snip]
>
>
> in my renderContentOn: html definition I enter the following:
> html image: 'Resources/images.jpg' altText: 'Cybele-photo01.jpg'.


Since you specified the Resources directory as the your file root (in
your server startup code) you don't need it it.  The file name
(Cybele-photo01.jpg) doesn't belong in the alttext part of the tag.
Also, do you have a directory called images.jpg in your Resources
directory?  Here's what I think you want but it depends on what your
directory structure is below Resources:

html image: 'images.jpg/Cybele-photo01.jpg' altText: 'Photo of Cybele'

Hope that helps...

David

_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners



--
Tom
"Ecrasez l'Infame!" -- Voltaire


--
Tom
"Ecrasez l'Infame!" -- Voltaire _______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: inserting images with Seaside

Thanks for your help. But I'm still confused about the directory tree being used. My files are in this hierarchy:- MySqueak (dir)    - Squeak3.8-TJK.image    - Resources (dir)        - Cybele-photo01.jpg What I understand your message to mean is that the documentRoot object contains static files that I can render without additional path information. So an image in Resources should render just by giving its filename. So I tried html image: 'Cybele-photo01.jpg' altText: 'Cybele photo'.This givesError: "/seaside/Cybele-photo01.jpg" not found.Since that didn't render the image, I tried:html image: 'Resources/Cybele- photo01.jpg' altText: 'Cybele photo'.But also gives the not found error.Error: "/seaside/Resources/Cybele-photo01.jpg" not found.So at this point I'm stumped. I'm sure it's a trivial config issue. I'll keep working through the tutorial. Thanks again.Tom KellerAlso, the aOn 7/22/06, David Shaffer <cdshaffer@xxxxxxx> wrote: Thomas Keller wrote:> [snip]>>> in my renderContentOn: html definition I enter the following: > html image: 'Resources/images.jpg' altText: 'Cybele-photo01.jpg'.Since you specified the Resources directory as the your file root (inyour server startup code) you don't need it it.  The file name (Cybele-photo01.jpg) doesn't belong in the alttext part of the tag.Also, do you have a directory called images.jpg in your Resourcesdirectory?  Here's what I think you want but it depends on what yourdirectory structure is below Resources: html image: 'images.jpg/Cybele-photo01.jpg' altText: 'Photo of Cybele'Hope that helps...David_______________________________________________Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxxhttp://lists.squeakfoundation.org/mailman/listinfo/beginners -- Tom"Ecrasez l'Infame!" -- Voltaire _______________________________________________ Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners

Next Message by Date: click to view message preview

Re: troubleshooting question

David,That is very interesting. Thanks. I am just getting the start of the sensation you describe. Perhaps astronauts have the same problem getting used to weightlessness.Thanks again.Tom Keller On 7/22/06, David T. Lewis <lewis@xxxxxxxxxxxxx> wrote: On Thu, Jul 20, 2006 at 11:03:11AM -0700, Thomas Keller wrote:> Perhaps this is the problem?> When I ran this in a worksheet:> a _ OSProcess thisOSProcess stdOut.> Transcript show: a> > show: returned "nil"> So nextPutAll: has no where to print to?Yes, that's exactly right. Your system cannot find its standard output(because it does not have the necessary platform-specific OSProcess plugin installed), so its standard output is nil. And nil is reallyan object, like everything else in Squeak. When you send the message#nextPutAll: to the nil object, the nil object responds by throwinga MessageNotUnderstood error (MessageNotUnderstood is also an object, you can find in in a browser if you like). The default response toa MessageNotUnderstood error is to open a debugger, which lets youpoke around and figure out what went wrong.> So my next question is how do I find the systems STDOUT pid? There are several ways to answer this, so let me start by takingthe question literally. With the VM and plugins you are currentlyusing, you cannot see either the pid of the process that Squeakis running in, or the identity of the STDOUT steam.  But not to worry, you probably don't really need either of these.It may seem odd at first, but try to think of Squeak as a selfcontained object environment, rather than as a program that doesI/O to STDOUT and to files. The Transcript usually plays the role of STDOUT in the sense that you can evaluate things and show theresult on the Transcript. Even more commonly, you can evaluatean _expression_ (which may invoke some computation of arbitrarycomplexity), and "inspect it" to see the results directly. But back to being literal. If you really want to see the pidof the current Squeak process, and to have access to theSTDOUT, STDIN, and STDERR streams, then you need to run yourSqueak image with a virtual machine that has the OSProcess plugin extension. You can get this from http://www.squeakvm.org/unix/.If you install the MacOSX VM from this page, it will providethe OSProcess plugin, and if you run your Squeak image with this VM, it should do exactly what you want.I'm glad that you are interested in OSProcess, because I wroteit. But what I really hope is that you will quickly discoverthat OSProcess is completely unnecessary for almost everything you will want to do in Squeak. In my own experience, the more Ibecame comfortable with Squeak, the less I worried about traditionalfile I/O and the like. It's nice to be able to do that stuff(hence the OSProcess extensions), but it's rarely needed once you get comfortable with the Squeak environment.Dave_______________________________________________Beginners mailing listBeginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners-- Tom"Ecrasez l'Infame!" -- Voltaire _______________________________________________ Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners

Previous Message by Thread: click to view message preview

Re: inserting images with Seaside

Thanks for your help. But I'm still confused about the directory tree being used. My files are in this hierarchy:- MySqueak (dir)    - Squeak3.8-TJK.image    - Resources (dir)        - Cybele-photo01.jpg What I understand your message to mean is that the documentRoot object contains static files that I can render without additional path information. So an image in Resources should render just by giving its filename. So I tried html image: 'Cybele-photo01.jpg' altText: 'Cybele photo'.This givesError: "/seaside/Cybele-photo01.jpg" not found.Since that didn't render the image, I tried:html image: 'Resources/Cybele- photo01.jpg' altText: 'Cybele photo'.But also gives the not found error.Error: "/seaside/Resources/Cybele-photo01.jpg" not found.So at this point I'm stumped. I'm sure it's a trivial config issue. I'll keep working through the tutorial. Thanks again.Tom KellerAlso, the aOn 7/22/06, David Shaffer <cdshaffer@xxxxxxx> wrote: Thomas Keller wrote:> [snip]>>> in my renderContentOn: html definition I enter the following: > html image: 'Resources/images.jpg' altText: 'Cybele-photo01.jpg'.Since you specified the Resources directory as the your file root (inyour server startup code) you don't need it it.  The file name (Cybele-photo01.jpg) doesn't belong in the alttext part of the tag.Also, do you have a directory called images.jpg in your Resourcesdirectory?  Here's what I think you want but it depends on what yourdirectory structure is below Resources: html image: 'images.jpg/Cybele-photo01.jpg' altText: 'Photo of Cybele'Hope that helps...David_______________________________________________Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxxhttp://lists.squeakfoundation.org/mailman/listinfo/beginners -- Tom"Ecrasez l'Infame!" -- Voltaire _______________________________________________ Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners

Next Message by Thread: click to view message preview

images with seaside

Greetings,I'm working through the excellent tutorial by David Shafer ( http://www.shaffer-consulting.com/david/Seaside/)but I can't figure out how to get my images and other static (non-squeak) stuff to be found. I have a directory named "Resources" in the same directory as my image file. I started the server with the following:"Kill all existing Kom HTTP servers"HttpService allInstancesDo: [ :each | each stop. each unregister ]. "Start a new server o port 9090 serving both static content and seaside apps"| ma seaside |seaside _ WAKom default.ma _ ModuleAssembly core.ma serverRoot: (FileDirectory default directoryNamed: 'Resources') fullName. ma alias: '/seaside' to: [ma addPlug: [ :request | seaside process: request]].ma documentRoot: (FileDirectory default directoryNamed: 'Resources') fullName.ma directoryIndex: 'index.html'.ma serveFiles. (HttpService startOn: 9090 named: 'httpd') plug: ma rootModulein my renderContentOn: html definition I enter the following:html image: 'Resources/images.jpg' altText: 'Cybele-photo01.jpg'. The Seaside component renders fine, but the image in Resources gives the message:Error: "/seaside/Resources/images.jpg" not foundWhat am I doing wrong?-- Tom "Ecrasez l'Infame!" -- Voltaire _______________________________________________ Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by