Re: [gtk-list] Re: GladePerl: Object context
- From: Dermot Musgrove <dermot musgrove virgin net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: GladePerl: Object context
- Date: Wed, 18 Aug 1999 17:27:38 +0000
Hi again,
Dermot Musgrove wrote:
>
> I guess that the proper way would be to pass a ref to the constructed
> object as data to the signal_connect() call that connects the
> button/menuitem to a handler. eg. in my example generated BusFrame
> constructor
> $forms->{'BusFrame'}{'Index'}->signal_connect( 'activate',
> 'on_Index_activate', $self );
>
I have just tried this and it works but causes problems when Gtk->main_quit
is called. It throws some perl warnings during global destruction. eg.
Attempt to free unreferenced scalar during global destruction.
...
...
Attempt to free unreferenced scalar during global destruction.
Can't upgrade that kind of scalar during global destruction.
I think that this is because Perl/Gtk decreases the refcounts using
Sv_REFCNT_dec() during Gtk->main_quit() but Perl did not know and checked
again during global destruction. I have seen similar messages before but
never tracked them down. The 'Attempt to...' message only appears with
'perl -w' but the 'Can't upgrade...' message is a more serious Perl internal
error that we should not be seeing.
I am guessing that it is caused by calling Gtk->main_quit() in a different
perl module than Gtk->main was called or that a signal handler parameter is
hanging around somewhere but if anyone knows what I am doing wrong, please
tell me.
Regards, Dermot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]