//@code begintemplate A objref this, list, obj proc init() { list = new List() list.append(this) for i=0,4 { obj = new Random() list.append(obj) } list.browser() list.select_action("act(hoc_ac_)") } proc act() { printf("item %d selected in list of object %s\n", $1, this) } endtemplate A objref a[2] for i=0,1 a[i] = new A()