On 05.08.2012, at 13:02, laci wrote:
Can anybody explain how does the html block variable - marked bold - gets initialized in the following method of TwitterSearch.
success: tweets
| playground table tr |
playground := '#playground' asJQuery.
playground empty.
[:html |
html inspect.
table := html table.
table element id: 'twitterwall'.
tweets do: [ :tweet |
tr := html tr.
table append: tr.
Tweet openAt: tr with: tweet
]
] appendToJQuery: playground.
appendToJQuery: is defined in BlockClosure as:
appendToJQuery: aJQuery
self value: (HTMLCanvas onJQuery: aJQuery)
In your snippet html is defined as HTMLCanvas onJQuery: playground .
HTH,
Felix