in reply to How can I add a new option to a composit ptk widget
You only show a bit of code, but it seems you are running into an old problem with objects where you need to delete your new option first. Read perldoc Tk::Derived. For example:
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
sub Populate { my ( $self, $args ) = @_; #------------------------------------------------------------------- #take care of args which don't belong to the SUPER, see Tk::Derived my $xtra_arg = delete $args->{-dooda}; #delete and read same time if( defined $xtra_arg ) { $self->{'dooda'} = $xtra_arg } #----------------------------------------------------------------- $self->SUPER::Populate($args); } Otherwise, show a complete running example.
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How can I add a new option to a composit ptk widget
by Anonymous Monk on Apr 13, 2012 at 05:50 UTC |
In Section
Seekers of Perl Wisdom