$self->{txt_box}=txt_box->new( $self->{frm}, sub {$self->updt} );
####
$self->{txt_box}=txt_box->new( $self->{frm}, \&test_if_txt_box_contents_passed_back );
####
sub new { my $class = shift; my $self = {}; bless( $self, $class ); #std line
$self->{parent_widg}=shift;
$self->{sub_to_call_on_keypress}=shift; <===================LOOK HERE
$self->{contents}='';
$self->{entry}=$self->{parent_widg}->new_ttk__entry( -width => 50, -textvariable => \$self->{contents}, );
$self->{entry}->g_pack( -expand => 0, -fill => 'x', -side => top); #-fill => 'both'
globals::new_bindtag('new_tag',$self->{entry},4);
Tkx::bind( 'new_tag', "", [ sub { $self->upon_keypress(@_) }, Tkx::Ev("%W","%K","%k") ] );
return $self; } #std line
sub upon_keypress { #calls the sub/method you supplied...if an ordinary sub you supply \&sub_nm if method then just obj->method_nm
my ($self, $win, $key_nm, $key_no) = @_; #tick
print "in upon_keypress and so far you've got $self->{contents}\n "; #tick
$self->{sub_to_call_on_keypress}->( $self->{contents} ); #bug here...$self->{contents} gets passed to ORDINARY SUB but not updt method <===================LOOK HERE
}