Smalltalk mode

 
1
" 
2
    This is a test of the Smalltalk code
3
"
4
Seaside.WAComponent subclass: #MyCounter [
5
    | count |
6
    MyCounter class >> canBeRoot [ ^true ]
7
8
    initialize [
9
        super initialize.
10
        count := 0.
11
    ]
12
    states [ ^{ self } ]
13
    renderContentOn: html [
14
        html heading: count.
15
        html anchor callback: [ count := count + 1 ]; with: '++'.
16
        html space.
17
        html anchor callback: [ count := count - 1 ]; with: '--'.
18
    ]
19
]
20
21
MyCounter registerAsApplication: 'mycounter'
22

Simple Smalltalk mode.

MIME types defined: text/x-stsrc.