Re: Gtk3::Ex::DBI::Datasheet query() signal problem



Yikes :)

I'll try to reproduce it here. If not, I might get back to you and ask
for a small sample script that triggers the issue. I have to admit,
since the port from Gtk2, I lost quite a bit of functionality ( custom
cell renderers ) and haven't quite investigated all errors that didn't
cause me immediate issues. Is this actually causing any bugs for you,
or just producing nasty warnings? My guess is that where previously I
had to ( or could ) destroy some signals attached to various things,
maybe the thing this signal is attached to is already destroyed, and
took the signal with it?

Anyway ... I'll look into it. Thanks for using my software :)

Dan

On Sun, Nov 8, 2015 at 1:53 AM, Geert Dobbels
<dobbels geert googlemail com> wrote:
Hello,

I started to use Gtk3::Ex::DBI::Datasheet a week or 2 ago and have been
successful with all I needed until I started to use the query() method on an
existing Datasheet object.  I tried with and without a where_object but
always get the same result:

GLib-GObject-WARNING **: gsignal.c:2579: instance '0x85952a0' has no handler
with id '1496' at
/home/geert/Documents/proyectos/gladetests/Gtk3/Ex/DBI/Datasheet.pm line
2014.

The line 2014 is where the signal_handler_disconnect is done in the
following chunk of code exctracted from Datasheet.pm:

  # Destroy changed_signal attached to old model ...
    if ( $self->{changed_signal} ) {
$self->{treeview}->get_model->signal_handler_disconnect(
$self->{changed_signal} );
    }


I had a look at the $self object to see if I could find anything wrong with
it, but could not get anything out of that.  This is a Data::Dumper printout
of the $self variable right before the above shown chunk of code is
executed:

self : $VAR1 = bless( {
                 'treeview_treestore_def' => [
                                               'Glib::Int',
                                               'Glib::String',
                                               'Glib::String',
                                               'Glib::String'
                                             ],
                 'column_info' => {
                                    'projectname' => {}
                                  },
                 'changed_signal' => 1496,
                 'query_execution_time' => '0.000144004821777344',
                 'recordset_tool_items' => undef,
                 'after_size_allocate' => undef,
                 'quiet' => 0,
                 'sw_footer_no_scroll' => undef,
                 'fixed_row_height' => 0,
                 'auto_incrementing' => 1,
                 'recordset_tools_box' => undef,
                 'footer' => undef,
                 'dump_on_error' => undef,
                 'supported_recordset_items' => {
                                                  'undo' => {
'icon_name' => 'edit-undo',
                                                              'type' =>
'button'
                                                            },
                                                  'apply' => {
'type' => 'button',
'icon_name' => 'gtk-apply'
                                                             },
                                                  'delete' => {
'icon_name' => 'gtk-delete',
'type' => 'button'
                                                              },
                                                  'insert' => {
'icon_name' => 'gtk-add',
'type' => 'button'
                                                              }
                                                },
                 'data_lock_field' => undef,
                 'on_insert' => undef,
                 'primary_key_column' => undef,
                 'auto_tools_box' => undef,
                 'status_icon_width' => 0,
                 'custom_changed_text' => undef,
                 'dbh' => bless( {}, 'DBI::db' ),
                 'months_array' => 'Dec',
                 'dont_update_keys' => 0,
                 'quick_renderers' => 0,
                 'server' => 'MySQL',
                 'objects_and_signals' => [
                                            [
                                              bless( {
'dependant_columns' => [],
                                                       'column' => 1,
                                                       'on_changed' => undef
                                                     },
'Gtk3::CellRendererText' ),
                                              1370
                                            ],
                                            [
                                              bless( {
                                                       'on_changed' =>
undef,
'dependant_columns' => [],
                                                       'column' => 2
                                                     },
'Gtk3::CellRendererText' ),
                                              1411
                                            ],
                                            [
                                              bless( {
                                                       'on_changed' =>
undef,
                                                       'column' => 3,
'dependant_columns' => []
                                                     },
'Gtk3::CellRendererText' ),
                                              1452
                                            ],
                                            [
                                              bless( {}, 'Gtk3::TreeView' ),
                                              1489
                                            ],
                                            [
                                              bless( {}, 'Gtk3::Window' ),
                                              1490
                                            ]
                                          ],
                 'vbox' => undef,
                 'column_name_to_number_mapping' => {
                                                      'companyId' => 3,
'_status_column_' => 0,
                                                      'Id' => 2,
                                                      'project' => 1
                                                    },
                 'fields' => [
                               {
                                 'column' => 0,
                                 'renderer' => 'status_column',
                                 'header_markup' => '',
                                 'name' => '_status_column_',
                                 'treeview_column' => bless( {
'definition' => {
'name' => '_status_column_',
'date' => undef,
'number' => undef
},
'renderer' => bless( {
'dependant_columns' => [],
'on_changed' => undef
}, 'Gtk3::CellRendererPixbuf' )
                                                             },
'Gtk3::TreeViewColumn' )
                               },
                               {
                                 'renderer' => 'text',
                                 'builtin_render_functions' => [],
                                 'column' => 1,
                                 'x_percent' => 100,
                                 'current_width' => 250,
                                 'treeview_column' => bless( {
'renderer' => $VAR1->{'objects_and_signals'}[0][0],
'definition' => {
'name' => 'project',
'date' => undef,
'number' => undef
}
                                                             },
'Gtk3::TreeViewColumn' ),
                                 'read_only' => 1,
                                 'name' => 'project'
                               },
                               {
                                 'builtin_render_functions' => [],
                                 'renderer' => 'hidden',
                                 'column' => 2,
                                 'treeview_column' => bless( {
'renderer' => $VAR1->{'objects_and_signals'}[1][0],
'definition' => {
'number' => undef,
'date' => undef,
'name' => 'Id'
}
                                                             },
'Gtk3::TreeViewColumn' ),
                                 'hidden' => 1,
                                 'name' => 'Id'
                               },
                               {
                                 'name' => 'companyId',
                                 'treeview_column' => bless( {
'renderer' => $VAR1->{'objects_and_signals'}[2][0],
'definition' => {
'number' => undef,
'name' => 'companyId',
'date' => undef
}
                                                             },
'Gtk3::TreeViewColumn' ),
                                 'hidden' => 1,
                                 'column' => 3,
                                 'renderer' => 'hidden',
                                 'builtin_render_functions' => []
                               }
                             ],
                 'primary_keys' => [],
                 'multi_select' => '',
                 'treeview' => $VAR1->{'objects_and_signals'}[3][0],
                 'before_apply' => undef,
                 'friendly_table_name' => ' projects',
                 'read_only' => 1,
                 'schema' => undef,
                 'treeview_resize_signal' => 1489,
                 'treeview_current_width' => 250,
                 'fieldlist' => [
                                  '_status_column_',
                                  'projectname',
                                  'id',
                                  'companyid'
                                ],
                 'on_apply' => undef,
                 'before_insert' => undef,
                 'sql' => {
                            'from' => ' projects',
                            'order_by' => ' projectname asc',
                            'select' => ' CONCAT(projects.code,
projects.number, projects.version) AS projectname,
                         id, companyid'
                          },
                 'on_row_select' => undef,
                 'search_path' => undef,
                 'icons' => [
                              bless( {}, 'Gtk3::Gdk::Pixbuf' ),
                              bless( {}, 'Gtk3::Gdk::Pixbuf' ),
                              bless( {}, 'Gtk3::Gdk::Pixbuf' ),
                              bless( {}, 'Gtk3::Gdk::Pixbuf' ),
                              bless( {}, 'Gtk3::Gdk::Pixbuf' )
                            ],
                 'footer_treeview' => undef,
                 'default_font_size' => undef,
                 'current_width' => 0,
                 'auto_apply' => undef,
                 'column_sorting' => 0,
                 'on_changed' => undef
               }, 'Gtk3::Ex::DBI::Datasheet' );

Any suggestions on what might be going wrong here ?
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


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