Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Passing arguments to event handlers in WxPerl

by zentara (Archbishop)
on Sep 18, 2014 at 20:10 UTC ( [id://1101109]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Passing arguments to event handlers in WxPerl
in thread Passing arguments to event handlers in WxPerl

Can you make a working code example, that dosn't use any OO program? That would identify wheter it's a Wx problem, or an improper object model which you use.

You could also check the reference type of $self to see what you are getting.

sub Combobox1action { my( $self, $event ) = @_; print $self, "\n"; $self->SetTitle( 'Combo box selected' ); }
If $self prints out to be a WxWidget Combobox, your code should work. But if $self turns out to be the package you are holding your code in, MyFrame, a WxWidget frame, then you will need to find a way of clearly identifying the Combobox.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: Passing arguments to event handlers in WxPerl
by pwn01 (Initiate) on Sep 19, 2014 at 14:04 UTC
    When I print $self and $event, I get the following output: MyFrame=HASH(0x190ac84) Wx::CommandEvent=SCALAR(0x190aec4) The first value is the value of $self, the second is that of $event.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found