ItemFactory Callback
- From: "Jonathan Pelletier" <jonathan pelletier matrox com>
 
- To: <gtk-perl-list gnome org>
 
- Subject: ItemFactory Callback
 
- Date: Tue, 16 Oct 2001 11:05:36 -0400
 
Hi !
Does anybody know how to specify parameters for a callback function using
the ItemFactory structure ???
The "action" key in the GtkItemFactoryEntry structure seem to send a number
to my callback function but i don`t know how to get my parameters back from
that number :-(
my @menu_items = ( { path     => '/_File',
                     type     => '<Branch>' },
                   { path        => '/File/_New',
                     accelerator => '<control>N',
                     callback    => \&print_hello,
                         action      => ['test']},
                      ...
                 );
# basic callback
sub print_hello
  {
    my $widget = shift;
    my $string = shift;
    if($string)
      {
        print $string;
      }
    else
      {
        print "Hello World!\n";
      }
  }
The print_hello() function print me a number like `135147124` instead of the
array ref that i was expecting :-(
Can somebody help me ???
/<><><><><><><><><><><> Jonathan Pelletier <><><><><><><><><><><><>\
\                                                                  /
/                  Matrox Electronic Systems Ltd.                  \
\           MIS / Département des systèmes -- Groupe Unix          /
/                                                                  \
\   1055 Blv. St-Regis               Tel: (514) 822-6000 x.7589    /
/   Dorval (Quebec)                  Fax: (514) 822-6262           \
\   H9P 2T4                          Email: jpellet1 matrox com    /
/   http://www.matrox.com                                          \
\                                                                  /
/                Home: jonathan-2 pelletier polymtl ca             \
\<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>/
                          _
   ASCII ribbon campaign ( )
    - against HTML email  X
                & vcards / \
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]