Getting a web page

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

Getting a web page

Steve Graham
I'm a newbie to Smalltalk, but not to programming.

I'm trying to get a web page using an example from Squeak and Pharo (which I have loaded on my machine):


"  HTTPSocket httpShowPage: 'http://www.altavista.digital.com/
index.html'      "


When I select this and do it - I get nothing.


When I select this and print it - I get nil


What am I doing wrong?




Thanks, Steve


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

Re: Getting a web page

Mariano Martinez Peck
Hi and welcome. Maybe this screencast help you:

http://pharocasts.blogspot.com/2010/02/rest-xml-parsing-and-photos.html

Look for some classes/messages that Laurent uses there.

Cheers

Mariano

On Fri, Feb 26, 2010 at 11:35 AM, Steve Graham <[hidden email]> wrote:
I'm a newbie to Smalltalk, but not to programming.

I'm trying to get a web page using an example from Squeak and Pharo (which I have loaded on my machine):


"  HTTPSocket httpShowPage: 'http://www.altavista.digital.com/
index.html'      "


When I select this and do it - I get nothing.


When I select this and print it - I get nil


What am I doing wrong?




Thanks, Steve


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



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

Re: Getting a web page

Marcus Denker-4

On Feb 26, 2010, at 4:22 PM, Mariano Martinez Peck wrote:

>
> On Fri, Feb 26, 2010 at 11:35 AM, Steve Graham <[hidden email]> wrote:
> I'm a newbie to Smalltalk, but not to programming.
>
> I'm trying to get a web page using an example from Squeak and Pharo (which I have loaded on my machine):
>
>
>
> "  HTTPSocket httpShowPage: 'http://www.altavista.digital.com/ 
> index.html'      "
>

use another server :-) the digital is dead :-)

        HTTPSocket httpShowPage: 'heise.de'

Works here. But: this method is kind of useless, as it just dispays the html by doing:

        (StringHolder new contents: doc) openLabel: url.

We should remove that method.

        Marcus



--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


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

Re: Getting a web page

Steve Graham
In reply to this post by Steve Graham
I'm using Pharo-1.0-10508-rc2.

And, yes, I was trying to "do" a comment.  Silly me.

Thanks for thinking of the obvious (to everyone but me).  Works fine now.


Steve

--- On Fri, 2/26/10, Michael Roberts <[hidden email]> wrote:

From: Michael Roberts <[hidden email]>
Subject: Re: [Pharo-users] Getting a web page
To: "Steve Graham" <[hidden email]>
Date: Friday, February 26, 2010, 9:52 AM

Which version of Pharo are you using?  When I try that in a core 1.0 image it seems to work ok.  Looking at the code it opens a window for you so you only need to do-it.  I assume you are not selecting the quotes, otherwise that would just be a comment.

cheers,
Mike

On Fri, Feb 26, 2010 at 2:35 PM, Steve Graham <jsgrahamus@...> wrote:
I'm a newbie to Smalltalk, but not to programming.

I'm trying to get a web page using an example from Squeak and Pharo (which I have loaded on my machine):


"  HTTPSocket httpShowPage: 'http://www.altavista.digital.com/
index.html'      "


When I select this and do it - I get nothing.


When I select this and print it - I get nil


What am I doing wrong?




Thanks, Steve


_______________________________________________
Pharo-users mailing list
Pharo-users@...
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users




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

Re: Getting a web page

Stéphane Ducasse
Don't worry
sillyness is only when you ask several the same question :)
I'm daily doing mistakes but I try to learn fast :)

Stef

On Feb 27, 2010, at 1:40 AM, Steve Graham wrote:

> I'm using Pharo-1.0-10508-rc2.
>
> And, yes, I was trying to "do" a comment.  Silly me.
>
> Thanks for thinking of the obvious (to everyone but me).  Works fine now.
>
>
> Steve
>
> --- On Fri, 2/26/10, Michael Roberts <[hidden email]> wrote:
>
> From: Michael Roberts <[hidden email]>
> Subject: Re: [Pharo-users] Getting a web page
> To: "Steve Graham" <[hidden email]>
> Date: Friday, February 26, 2010, 9:52 AM
>
> Which version of Pharo are you using?  When I try that in a core 1.0 image it seems to work ok.  Looking at the code it opens a window for you so you only need to do-it.  I assume you are not selecting the quotes, otherwise that would just be a comment.
>
> cheers,
> Mike
>
> On Fri, Feb 26, 2010 at 2:35 PM, Steve Graham <[hidden email]> wrote:
> I'm a newbie to Smalltalk, but not to programming.
>
> I'm trying to get a web page using an example from Squeak and Pharo (which I have loaded on my machine):
>
>
>
> "  HTTPSocket httpShowPage: 'http://www.altavista.digital.com/ 
> index.html'      "
>
>
>
> When I select this and do it - I get nothing.
>
>
>
> When I select this and print it - I get nil
>
>
>
> What am I doing wrong?
>
>
>
>
>
>
>
> Thanks, Steve
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


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

Re: Getting a web page

Distinguished
Here at Distinguished, you can scan our site to explore the top software development companies that can deliver professional services which can help your brand in maximizing its performance and customer engagement. We conduct extensive research and utilize credible sources to ensure our selection of top companies is legit and the best for clients.