[Newbies] problems pulling data from a url..

Cédrick Béler cdrick65 at gmail.com
Mon Apr 5 10:49:00 UTC 2010


> > the problem here is that HTTPSocket httpGet: '' return
> > a RWBinaryOrTextStream.
> > To get the string, you need to send the message contents to the stream.
> > (HTTPSocket httpGet: 'json url') contents
> >
>
> thanks!
>
> just getting back to this..
>
> my question is.. how do i know what part of the stream to look at? as
> in, how would i know that contents is the part i am interested in?
>
> thanks!
>
> oh.. and i am reading the docs about streams again...
>
> thanks again!
>
>
>
Not sure I understand... :)

A stream encapsulates a collection and provide facilities to navigate
forward, backward, etc... (strings are collection - direct string
manipulation aren't efficient)...  So you use a stream to manipulate
efficiently your string, and to get the string back (or whatever collection
that was associated to the string), you send the message #contents.

If you se the class comment of Stream
"I am an abstract class that represents an accessor for a sequence of
objects. This sequence is referred to as my "contents"."


hth,





> --
>
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>



-- 
Cédrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100405/4a2c13bc/attachment.htm


More information about the Beginners mailing list