[Newbies] problems pulling data from a url..
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
> 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?
> 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"."
> photographer, journalist, visionary
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners