Hi,
I recently started using wxperl (6 months ago) and this week I got a problem
trying to define a context menu for my application.
In my frame 'new' method I have
# define context menu
$this->{ResSecCtx} = Wx::Menu->new();
$this->{NewResSec} = $self->{ResSecCtx}->Append( 71000, "New Reserved
Section...", "" );
$this->{ModResSec} = $self->{ResSecCtx}->Append( 72000, "Modify Reserved
Section...", "" );
...
# bind events
Wx::Event::EVT_MENU( $self, $self->{NewResSec}, \&OnNewReserved);
Wx::Event::EVT_MENU( $self, $self->{ModResSec}, \&OnModReserved);
Wx::Event::EVT_CONTEXT_MENU( $self, \&OnPopupMenu );
and then in frame class:
....
sub OnPopupMenu
{
...
$this->PopupMenu($self->{ResSecCtxMenu}, $x, $y);
...
}
sub OnNewReserved
{
...
}
sub OnModReserved
{
...
}
The context menu is correctly displayed but it seems that no event is sent
when I select a choice because event handlers are not executed.
Could you help me to understand the problem?
Thank you
Alessandro