[gtkada] Question wrt using the new paradigm for connecting handlers to signals
Rob Groen
robgr at xs4all.nl
Mon Oct 19 13:16:29 CEST 2015
Hello all,
I am having a bit of trouble using the new paradigm for connecting
handlers and signals.
E.g. I have a Gtk_Entry and I want a handler to connect to the "changed"
signal. So I expect an On_Changed (object, …) method in Gtk.Gentry.
However, the "changed" signal is defined on a Gtk_Editable (a
Gtype_Interface) and not on a Gtk_Entry. I know that Gtk_Entry
implements Gtk_Editable, but if I want to connect with the On_Changed
method I need to convert the entry to a Gtk_Editable, and then also the
profile of the handler needs to specify a Gtk_Editable instead of a
Gtk_Entry, which is not very nice and requires yet another conversion in
the handler.
I know I can use the old way, using instantiations of Gtk.Handlers, but
that leads to a mixed approach: some handlers need to be connected the
old school way (i.e. the ones that have signals on Gtype_Interfaces the
object implements), others can use the <object>.On_<signal> method.
Is there a way to use the new paradigm without the conversion to/from a
Gtype_Interface ?
Regards, Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/gtkada/attachments/20151019/d8679718/attachment.html>
More information about the gtkada
mailing list