Object subclass: #MyTest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'MyTest'
Press <ctrl-s> (on windows. or choose 'Accept' from the context menu - but the 3.0alpha I'm on has an error with this. works in 2.0) parse
| data doc entries entry content url |
"Get the data, you can try and print this, if you want"
data := 'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl retrieveContents.
"parse it"
doc := XMLDOMParser parse: data.
"split up"
entries := doc
allNodesSelect: [ :n | n name = 'entry' ].
"pick one"
entry := entries anyOne.
content := entry
nodesDetect: [ :n | n name = 'content' ].
url := content attributeAt: 'src'.
4. Create a second method get
(ZnEasy getGif: url) asMorph openInHand . "Opens image"
4. Evaulate the following in a Workspace with <DoIt> from the context menu. MyTest new parse get.
5. At the debugger prompt, click <Debug> then right-click and choose <Full Stack>. Scroll down the call stack and select 'MyTest get'. (In my 3.0alpha you need to select it two times to highlight current position - something to clean up there)
If you really wanted, on class Point you could define method ',' with parameter 'otherPoint' as follows...
then you could do draw rectangles like this...