RE: [gtkmm] creating a C callback from a SigC::Slot without a Sig nalProxy
- From: Murray Cumming Comneon com
- To: cactus cactus rulez org
- Cc: gtkmm-list gnome org, libsigc-mlist lists sourceforge net
- Subject: RE: [gtkmm] creating a C callback from a SigC::Slot without a Sig nalProxy
- Date: Fri, 28 Mar 2003 14:18:53 +0100
----Original Message-----
> From: ERDI Gergo [mailto:cactus cactus rulez org]
> Sent: Freitag, 28. März 2003 14:10
> To: Cumming Murray (COMNEON Linz)
> Cc: GTKmm Mailing List; libsigc-mlist lists sourceforge net
> Subject: RE: [gtkmm] creating a C callback from a SigC::Slot
> without a Sig nalProxy
>
>
> On Thu, 27 Mar 2003 Murray Cumming Comneon com wrote:
>
> > I guess the problem is the async part, meaning that the
> function will return
> > before the callback has actually been called. This function
> doesn't seem to
> > have a "destroy user data" callback parameter so the
> user_data would have to
> > survive _forever_.
>
> While getting bored to death today I thought about this some more and
> realized that the callback _is_ the 'destroy user data'
> callback as well,
So, just make a regular proxy like the ones you see in the TreeView .cpp
files, and do a "delete this" in the callback instead of the destroy
callback.
> since it's only going to be called once. So, I guess my
> question can now
> be reduced to (emphasized for our readers on the SigC list who have
> missed the beginning of this thread):
>
> How can I ref/unref a SigC::Slot?
I don't think you need to worry about that. Just delete your copy of the
slot. Reference-counting is automatic.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]