From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada)
Date: Tue, 20 Nov 2012 11:16:22 +0000 (UTC)
Date: 2012-11-20T11:16:22+00:00 [thread overview]
Message-ID: <k8foq6$1hv$2@dont-email.me> (raw)
In-Reply-To: 8906e1e3-3b18-4b37-ac46-3857db47cea4@googlegroups.com
On Mon, 19 Nov 2012 12:22:21 -0800, ake.ragnar.dahlgren wrote:
> On Monday, November 19, 2012 10:59:42 AM UTC+1, ake.ragna...@gmail.com
> wrote:
>> This problem has it's origin in the implementation of the MVC pattern
>> for a GtkAda application. Consider the following:
...
> Additional information if needed: The spec. of the Register_Handler
> procedure in the Gtkada.Builder package is declared as:
>
> procedure Register_Handler
> (Builder : access Gtkada_Builder_Record'Class;
> Handler_Name : String;
> Handler : Builder_Handler);
Okay, this is looking familiar...
A previous post of mine linked at the bottom of the ada.dk tutorial
contains the comment :
-- Having only Gtkada_Builder_Record'Class and GObject_Record'Class
-- seems restrictive. I failed to find any way to register and use
-- the following:
-- procedure Destroy(Object : access Gtk_Widget_Record'Class);
-- eventually resorting to Gtk.Builder.Get_Widget in the procedure body.
-- I must be missing something here...
To expand on that; clearly everything is a subclass of GObject_Record,
and therefore the intent must be that anything more complex like your
On_Quit example be registered as an Object_Handler not a Builder_Handler.
-- type Builder_Handler is access procedure
-- (Builder : access Gtkada_Builder_Record'Class);
-- type Object_Handler is access procedure
-- (User_Data : access GObject_Record'Class);
The remaining question would be ... how?
It might be worth putting your On_Quit handler into the tutorial example,
and asking "How do I register this as an Object_Handler?" on the GtkAda
mailing list.
- Brian
next prev parent reply other threads:[~2012-11-20 11:16 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 9:59 Access type to member procedure of instance (Object Oriented programming in Ada) ake.ragnar.dahlgren
2012-11-19 11:13 ` Georg Bauhaus
2012-11-19 11:39 ` Brian Drummond
2012-11-20 11:43 ` Brian Drummond
2012-11-20 21:57 ` Randy Brukardt
2012-11-19 13:03 ` sbelmont700
2012-11-19 16:18 ` Adam Beneschan
2012-11-19 17:02 ` Peter C. Chapin
2012-11-19 18:23 ` Adam Beneschan
2012-11-19 20:57 ` Peter C. Chapin
2012-11-19 21:26 ` Dmitry A. Kazakov
2012-11-19 22:19 ` Adam Beneschan
2012-11-20 10:12 ` Dmitry A. Kazakov
2012-11-20 21:51 ` Randy Brukardt
2012-11-21 8:24 ` Dmitry A. Kazakov
2012-11-21 22:19 ` Randy Brukardt
2012-11-20 10:59 ` Brian Drummond
2012-11-19 20:22 ` ake.ragnar.dahlgren
2012-11-20 11:16 ` Brian Drummond [this message]
2012-11-19 20:52 ` ake.ragnar.dahlgren
2012-11-19 21:56 ` Dmitry A. Kazakov
2012-11-22 9:49 ` ake.ragnar.dahlgren
2012-11-19 22:13 ` sbelmont700
2012-11-19 23:59 ` Randy Brukardt
2012-11-20 0:05 ` Randy Brukardt
2012-11-20 1:00 ` Adam Beneschan
2012-11-20 21:38 ` Randy Brukardt
2012-11-20 23:43 ` Adam Beneschan
2012-11-21 22:12 ` Randy Brukardt
2012-11-22 1:59 ` Adam Beneschan
2012-11-29 2:43 ` Randy Brukardt
2012-11-20 0:52 ` Adam Beneschan
2012-11-20 21:34 ` Randy Brukardt
2012-11-20 11:28 ` Brian Drummond
2012-11-20 14:27 ` Georg Bauhaus
2012-11-20 15:52 ` Adam Beneschan
2012-11-22 9:47 ` ake.ragnar.dahlgren
2012-11-22 10:25 ` Dmitry A. Kazakov
2012-12-02 20:42 ` ake.ragnar.dahlgren
2012-12-03 11:21 ` Dmitry A. Kazakov
2012-12-03 20:21 ` ake.ragnar.dahlgren
2012-12-03 22:15 ` Dmitry A. Kazakov
2012-12-25 21:51 ` Gustaf Thorslund
2012-12-26 18:11 ` ake.ragnar.dahlgren
2012-11-22 12:13 ` Brian Drummond
2012-12-03 16:17 ` ake.ragnar.dahlgren
2012-12-03 21:56 ` Brian Drummond
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox