[gtkada] Passing context objects to handlers via Register_Handler
R. Tyler Croy
tyler at monkeypox.org
Thu Jan 12 09:45:13 CET 2017
(replies inline)
On Thu, 12 Jan 2017, Emmanuel Briot wrote:
> > I *believe* that this isn't working as I would like because
> > Gtkada_Builder_Record isn't a tagged type. From my understanding,
> > procedure/function signatures using Gtkada_Builder_Record'Class would gladly
> > accept my extended (and tagged) record, if the "parent" were to be tagged.
>
> It is a tagged type, since it extends a tagged type.
>
> > arun.adb:56:16: expected type "Gtkada_Builder" defined at gtkada-builder.ads:84
> > arun.adb:56:16: found type "Arun_Builder" defined at line 40
> > gprbuild: *** compilation phase failed
>
>
> Gtk_New specifically expected a Arun_Builder, so you can???t give it another type.
> Instead:
>
>
> Builder := new Arun_Builder_Record;
> Gtkada.Builder.Initialize (Builder);
>
> should do the trick.
THat did work, thanks. I guess I didn't follow the
Gtk.Builder.Gtk_Builder_Record hierarchy enough up to GObject_Record.
- R. Tyler Croy
------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>
xmpp: rtyler at jabber.org
% gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: </pipermail/gtkada/attachments/20170112/aa63b1bf/attachment.sig>
More information about the gtkada
mailing list