Oh, here's the code. Definitely not finished, and probably never will be, because Claro needs a major re-write.
import claro, strutils
type
TButtonArray = array[0..9, ptr TButton]
var bTop:cint = 16
var buttons:TButtonArray
var lb: ptr TListBox
proc window_closed (obj: ptr TClaroObj, event: ptr TEvent) {.cdecl.} =
claro_shutdown()
proc button_pressed (obj: ptr TClaroObj, event: ptr TEvent) {.cdecl.} =
var seed:cint = 10
var button = cast[ptr TButton](obj)
var multiplyer = cast[int](button.naddress[0])
for i in 1..10:
discard listbox_append_row( lb, IntToStr(multiplyer) & " x " & IntToStr(i) & " = " & IntToStr( multiplyer*i ) )
var Form1 = newWindow( nil, new_bounds( 100, 100, 500, 330 ), 1 )
window_set_title( Form1, "Tiny Times Table" )
object_addhandler( Form1, "destroy", window_closed )
lb = newListBox(Form1, new_bounds(bTop,bTop, 300,300), 0)
for i in low(buttons)..high(buttons):
var val = intToStr(i+1)
buttons[i] = newButton( Form1, new_bounds( 410, bTop, 70, -1 ), 0, intToStr(i+1) )
object_addHandler( buttons[i], "pushed", button_pressed)
buttons[i].naddress[0] = cast[ptr int](i+1)
bTop+=30
window_show(Form1)
window_focus(Form1)
claro_loop()
EDIT: fixed typo