comp.lang.ada
 help / color / mirror / Atom feed
From: briot.emmanuel@gmail.com
Subject: Re: help building ada with glade
Date: Mon, 9 Sep 2013 23:40:48 -0700 (PDT)
Date: 2013-09-09T23:40:48-07:00	[thread overview]
Message-ID: <3ae71819-7fa1-4d45-9363-a0b6aa1fde3c@googlegroups.com> (raw)
In-Reply-To: <1rlxflx3vn7d2$.gwfur2yxe3we.dlg@40tude.net>

> But it is impossible to do due to GTK design [**]. The most typical and
> safe pattern for handling signals is that a composite widget connects to a
> signal of its child and passes itself as a parameter to the signal handler,
> because you need to know it in the handler. For this
> Gtk.Handlers.User_Callback must be instantiated. I have no idea how a code
> generator could deal with this in the round-trip manner.

Just wanted to react on this small technical point: you do not want to use
a User_Callback if you are passing a child of GObject_Record in parameter.
Instead, use Object_Connect, which has the benefits of automatically
disconnecting whenever one of the two widgets (the one for the event, the
one in parameter) is destroyed. 
Plus that limits the number of instances of User_Callback, and thus reduces
the size of the executable.

      parent reply	other threads:[~2013-09-10  6:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 23:43 help building ada with glade Patrick
2012-02-23  8:44 ` Dmitry A. Kazakov
2012-02-23  9:58   ` Patrick
2012-02-24  5:53   ` J-P. Rosen
2012-02-24  8:39     ` Dmitry A. Kazakov
2012-02-24 23:12       ` J-P. Rosen
2012-02-25  9:06         ` Dmitry A. Kazakov
2012-02-26  6:55           ` J-P. Rosen
2012-02-26  8:36             ` Dmitry A. Kazakov
2013-09-07 20:37               ` Patrick
2013-09-10  6:40           ` briot.emmanuel [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox