JOption has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that whenever $mockOB->search is changed, is is not visible on the screen. It seems that the -textvariabe is not working like it should.my $mockOb = SomeClass->new; my $search = $contentFrame->new_ttk__entry(-takefocus => 1, -font => ' +Arial 11', -width => 40, -validate => 'focusout', -textvariable =>\$ +mockOb->search, -validatecommand => [\&searchValidation, Tkx::Ev('%P +')]); sub searchValidation{ ....do crazy stuff } SomeClass sub new { my $class = shift; my $self = { search = "" }; bless $self, $class; return $self; } sub search{ my $self = shift(); if(@_) { $self->{search} = shift(); } return $self->{search}; }
Tank you for your Help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Object Oriented reference in -textvariable
by Corion (Patriarch) on Aug 21, 2017 at 12:43 UTC | |
by JOption (Novice) on Aug 21, 2017 at 12:57 UTC | |
by Corion (Patriarch) on Aug 21, 2017 at 13:12 UTC | |
by JOption (Novice) on Aug 21, 2017 at 13:26 UTC | |
by Corion (Patriarch) on Aug 21, 2017 at 13:29 UTC |