Re: Dazed and confused about menus
- From: David Sword <gdsword williamsword co uk>
- To: gtk-perl-list gnome org
- Subject: Re: Dazed and confused about menus
- Date: 06 Nov 2003 15:17:14 +0000
On Thu, 2003-11-06 at 14:23, muppet wrote:
if($data[$cntr][1] eq 'P'){
my $progname = $subname;
^^^
This works perfectly!
$MenuItem[$cntr]->signal_connect('activate' =>
sub{\&RunProg(@_,$progname)} );
}else{
or pass the name string as the user data argument to the signal handler, like
this:
if($data[$cntr][1] eq 'P'){
# by passing subname as the user data, it will be
# appended to the closure's @_.
$MenuItem[$cntr]->signal_connect('activate' => sub{\&RunProg(@_)},
$subname );
}else{
And now I know how to pass user data as well!
Thank you very much - it all seems so easy when you point out how to do
it properly!
--
Regards
David Sword
Joint Managing Director Tel: 01236 725094
William Sword Ltd Fax: 01236 730472
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]