Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
more useful options
 
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


Comment on Re: How can I add a new option to a composit ptk widget
Download Code
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 pondering the Monastery: (6)
As of 2014-04-24 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls