comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <devotus@yahoo.com>
Subject: Re: GtkAda's "On_Edited"
Date: Mon, 30 May 2022 00:46:39 -0700 (PDT)	[thread overview]
Message-ID: <ea3ce162-277d-487a-af19-8126892d2ef9n@googlegroups.com> (raw)
In-Reply-To: <t71p94$obr$1@gioia.aioe.org>

> On_* procedures are useless most of the time.

I guess you mean in GtkAda? I've found them invaluable in other contexts. If so, that's disappointing. To be fair, in the hours of reading on this I did notice that Gtk+ itself makes this difficult; the On_* procedures seem to be a GtkAda enhancement.

In the end I made it work with an On_* design, but it was your suggestion that helped! I used the second form of On_Edited and passed a TreeView in the slot. To get the model:

      Tree_View: Gtk_Tree_View := Gtk_Tree_View(Self);
      Model: Gtk_Tree_Model := Get_Model( Tree_View );
      Iter     : Gtk_Tree_Iter := Get_Iter_From_String(Model, Path);
      Store: Gtk_List_Store := Gtk_List_Store( To_Object(Model) );

Getting the rest wasn't too hard after I had that. What I hadn't understood at first was that the Model had to be converted from the Interface via the To_Object function.

Thank you very much, and also for the quick answer!

john perry

PS If anyone knows how to make the first form of On_Edited work, I'd be delighted to know.

  reply	other threads:[~2022-05-30  7:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  5:28 GtkAda's "On_Edited" John Perry
2022-05-30  6:47 ` Dmitry A. Kazakov
2022-05-30  7:46   ` John Perry [this message]
2022-05-30 18:57     ` Dmitry A. Kazakov
2022-06-01  3:18       ` John Perry
replies disabled

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