Hello Aida community,
I have modified Aida, so now you can evaluate block if user click on an element.
I think example can tell more than words. Let implement counter:
viewCounter
| e inc counterElement dec |
e := WebElement new.
inc := e addText: '++'.
dec := e addText: '--'.
counterElement := e add: self counterElement.
inc
onClickDo: [counter := counter + 1]
andUpdate: counterElement.
dec
onClickDo: [counter := counter - 1]
andUpdate: counterElement.
self
pageFrameWith: e
title: ''
counterElement
| e |
e := WebElement new.
e addText: 'Counter: ', counter displayString.
^e
During modification one Aida method was changed, the rest of the
modifications is just new methods.
Code is availavle in two variants: VW parcel, and .st file so it can
be manually transfered(copy text of 5 methods) to Squeak. My Aida is
5.6.0.
It just first attempt intended to know if this way of handling events
is of interest, so don't except much(or any) stability from the code.
I wanted to post code to the Cincom public store, but was unsure about
how to name the package to not clutter other Aida packages.
My next post will be example of master-details grids relationship,
which together with counter example you can be find in Aida-BlocksDemo
(will be attached to next post).
Alex
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida