displaying photos

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

displaying photos

ching
Hi Janko,

As you suggested, I tried several variations like:
e addImage: '/photos/pap.jpg' and
e addImage: '\photos\pap.jpg' and
e addImage: 'photos\pap.jpg'

I also moved pap.jpg to the home directory so I can do this: e addImage: 'pap.jpg'
again, I tried with '\' and '/'
and nothing seems to be working.

This is what I have on:
defaultHomeDirectory
    "where the image started, but depending on Unix or Win style"
    ^(SpEnvironment onWindows ifTrue: ['.\'] ifFalse: ['./'])

Thanks,

Ching

On Fri, Feb 11, 2011 at 10:28 PM, Ching de la Serna <[hidden email]> wrote:
Hi Herbert,

Thanks for responding. I did as you suggested and the "Waiting for localhost...' notification disappeared but no images were displayed.
I tried different variations like putting the file on the same image as Squeak and using 'file:///pap.jpg' and nothing worked.

Ching


On Fri, Feb 11, 2011 at 7:00 PM, <[hidden email]> wrote:
Send Aida mailing list submissions to
       [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.aidaweb.si/mailman/listinfo/aida
or, via email, send a message with subject or body 'help' to
       [hidden email]

You can reach the person managing the list at
       [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Aida digest..."


Today's Topics:

  1. displaying photos or images (Ching de la Serna)
  2. Re: displaying photos or images (Herbert K?nig)


----------------------------------------------------------------------

Message: 1
Date: Fri, 11 Feb 2011 00:12:39 +0800
From: Ching de la Serna <[hidden email]>
Subject: [aida] displaying photos or images
To: [hidden email]
Message-ID:
       <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I would like to add photographs or images to my page and I have this:

           e addImage: 'photos\pap.jpg';

There are no errors but no photos are displayed either. The browser says
"Waiting for localhost"
What is the proper way to display photos in Aida?

Ching de la Serna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20110211/ac53a779/attachment.html

------------------------------

Message: 2
Date: Thu, 10 Feb 2011 17:54:45 +0100
From: Herbert K?nig <[hidden email]>
Subject: Re: [aida] displaying photos or images
To: AIDA/Web general discussion list <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1

Hi Ching,

CdlS> I would like to add photographs or images to my page and I have this:

CdlS>             e addImage: 'photos\pap.jpg';

not really sure but I believe, this defaults to a methodImage (a
method returning a ByteArray containing the contents of the image).

For small resources WebMethodResources are a cool thing because they
are versioned with Monticello.

See e.g. the comment in WebStyle>>importImage:from:

CdlS> There are no errors but no photos are displayed either. The browser says
CdlS> "Waiting for localhost"

I seem to remember this behaviour too.

CdlS> What is the proper way to display photos in Aida?

When I wanted to display images I used:
'file:///GobiBild001.jpg'
where the images where in the same folder as the Smalltalk image. So
it should be 'file://photos/pap.jpg' in your case.

CdlS> Ching de la Serna



Cheers,

Herbert                            mailto:[hidden email]



------------------------------

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida


End of Aida Digest, Vol 45, Issue 4
***********************************



_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: displaying photos

Janko Mivšek
Ching, try this one too:
       
        e addImage: 'photos/pap.jpg'

Also be sure that you have an image in subdirectory 'photos' in the
directory where your image resides.

Also, what returns AIDASite default homeDirectory ?

To be sure evaluate on Windows this:

        AIDASite default homeDirectory: './'

Janko

On 11. 02. 2011 18:52, Ching de la Serna wrote:

> Hi Janko,
>
> As you suggested, I tried several variations like:
> e addImage: '/photos/pap.jpg' and
> e addImage: '\photos\pap.jpg' and
> e addImage: 'photos\pap.jpg'
>
> I also moved pap.jpg to the home directory so I can do this: e addImage:
> 'pap.jpg'
> again, I tried with '\' and '/'
> and nothing seems to be working.
>
> This is what I have on:
> defaultHomeDirectory
>     "where the image started, but depending on Unix or Win style"
>     ^(SpEnvironment onWindows ifTrue: ['.\'] ifFalse: ['./'])
>
> Thanks,
>
> Ching
>
> On Fri, Feb 11, 2011 at 10:28 PM, Ching de la Serna <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Herbert,
>
>     Thanks for responding. I did as you suggested and the "Waiting for
>     localhost...' notification disappeared but no images were displayed.
>     I tried different variations like putting the file on the same image
>     as Squeak and using 'file:///pap.jpg' and nothing worked.
>
>     Ching
>
>
>     On Fri, Feb 11, 2011 at 7:00 PM, <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Send Aida mailing list submissions to
>                [hidden email] <mailto:[hidden email]>
>
>         To subscribe or unsubscribe via the World Wide Web, visit
>                http://lists.aidaweb.si/mailman/listinfo/aida
>         or, via email, send a message with subject or body 'help' to
>                [hidden email] <mailto:[hidden email]>
>
>         You can reach the person managing the list at
>                [hidden email] <mailto:[hidden email]>
>
>         When replying, please edit your Subject line so it is more specific
>         than "Re: Contents of Aida digest..."
>
>
>         Today's Topics:
>
>           1. displaying photos or images (Ching de la Serna)
>           2. Re: displaying photos or images (Herbert K?nig)
>
>
>         ----------------------------------------------------------------------
>
>         Message: 1
>         Date: Fri, 11 Feb 2011 00:12:39 +0800
>         From: Ching de la Serna <[hidden email]
>         <mailto:[hidden email]>>
>         Subject: [aida] displaying photos or images
>         To: [hidden email] <mailto:[hidden email]>
>         Message-ID:
>              
>          <[hidden email]
>         <mailto:[hidden email]>>
>         Content-Type: text/plain; charset="iso-8859-1"
>
>         Hi,
>
>         I would like to add photographs or images to my page and I have
>         this:
>
>                    e addImage: 'photos\pap.jpg';
>
>         There are no errors but no photos are displayed either. The
>         browser says
>         "Waiting for localhost"
>         What is the proper way to display photos in Aida?
>
>         Ching de la Serna
>         -------------- next part --------------
>         An HTML attachment was scrubbed...
>         URL:
>         http://lists.aidaweb.si/pipermail/aida/attachments/20110211/ac53a779/attachment.html
>
>         ------------------------------
>
>         Message: 2
>         Date: Thu, 10 Feb 2011 17:54:45 +0100
>         From: Herbert K?nig <[hidden email]
>         <mailto:[hidden email]>>
>         Subject: Re: [aida] displaying photos or images
>         To: AIDA/Web general discussion list <[hidden email]
>         <mailto:[hidden email]>>
>         Message-ID: <[hidden email]
>         <mailto:[hidden email]>>
>         Content-Type: text/plain; charset=ISO-8859-1
>
>         Hi Ching,
>
>         CdlS> I would like to add photographs or images to my page and I
>         have this:
>
>         CdlS>             e addImage: 'photos\pap.jpg';
>
>         not really sure but I believe, this defaults to a methodImage (a
>         method returning a ByteArray containing the contents of the image).
>
>         For small resources WebMethodResources are a cool thing because they
>         are versioned with Monticello.
>
>         See e.g. the comment in WebStyle>>importImage:from:
>
>         CdlS> There are no errors but no photos are displayed either.
>         The browser says
>         CdlS> "Waiting for localhost"
>
>         I seem to remember this behaviour too.
>
>         CdlS> What is the proper way to display photos in Aida?
>
>         When I wanted to display images I used:
>         'file:///GobiBild001.jpg'
>         where the images where in the same folder as the Smalltalk image. So
>         it should be 'file://photos/pap.jpg' in your case.
>
>         CdlS> Ching de la Serna
>
>
>
>         Cheers,
>
>         Herbert                            mailto:[hidden email]
>         <mailto:[hidden email]>
>
>
>
>         ------------------------------
>
>         _______________________________________________
>         Aida mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>         End of Aida Digest, Vol 45, Issue 4
>         ***********************************
>
>
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida