Re: Getting object parameter from libglade

On 06/25/01 German Poo Caaman~o wrote:
I'm working with Gtk::GladeXML to get the widgets and Glade 0.6.2.
On glade I create a GtkFileSelection widget asigning the signal
clicked on the ok_button as follow:
Signal: clicked
Handler: on_ok_button_clicked
Data: some_data
Objeto: some_object

Well, my perl code can run my widget, but I only gets two arguments,
not three as expected.

My code look like:

sub on_btn_browse_settings_clicked {
      my $xml = new Gtk::GladeXML("glade/");
      $file = $xml->get_widget('fileselection');
      show $file;

sub on_ok_button_clicked {
      my($widget, $data, $object) = @_;
      print Dumper($widget);
      print Dumper($data);
      print Dumper($object);

And I get:
$VAR1 = bless( {
                 '_gtk' => 136573064
               }, 'Gtk::Button' );
$VAR1 = 'some_data';
$VAR1 = undef;

So, where is 'some_object'?

Does a widget exists in the glade file with the 'some_object' name?
The object item in the signals notebook page in glade is used
to trigger a signal_connect_object() instead of signal_connect(),
and _NOT_ to supply additional data to the handler.


lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]