Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How can I add a new option to a composit ptk widget

by zentara (Archbishop)
on Apr 12, 2012 at 11:13 UTC ( #964746=note: print w/replies, xml ) Need Help??


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:
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

    Thanks for the help. It worked. All I had to is to make sure, the args that were not in the widgets are defined before

    "$self->SUPER::Populate($args)"

    then every thing works the same as all other args.

    Regards, smh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964746]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2016-09-30 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.