or download this
$main_self->{txt_box}=txt_box->new( $main_self->{frm}, sub {$main_self
+->updt} );
...
print "in upon_keypress and so far you've got $new_self->{contents
+}\n "; #tick
$new_self->{sub_to_call_on_keypress}->( $new_self->{contents} );
+#bug here...$self->{contents} gets passed to ORDINARY SUB but not upd
+t method <===================LOOK HERE
}