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

2015-11-08 Thread Daniel Kasak
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
 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' => [],
>

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

2015-11-08 Thread Geert Dobbels

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
],