You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
philippeback edited this page May 22, 2013
·
1 revision
The HTMLCanvas and TagBrush classes allow to deal with events pretty easily, like in:
MyWidget>>renderOn: html
"html happens to be an HTMLCanvas"
html p with: 'hello'; onClick: [ console log: 'clicked' ].
"but how does one gets the event and associated details?"
"... like this. And console log will give you all the drill down you need on the evt"
html p with: 'hello again'; onClick: [ :evt | console log: evt ].
On events methods can either work with a block without parameters, or with parameters.