From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:d87:b0:67b:311c:ecbd with SMTP id q7-20020a05620a0d8700b0067b311cecbdmr36576148qkl.146.1653896799970; Mon, 30 May 2022 00:46:39 -0700 (PDT) X-Received: by 2002:a25:33c6:0:b0:648:b8a1:a30e with SMTP id z189-20020a2533c6000000b00648b8a1a30emr52480073ybz.44.1653896799787; Mon, 30 May 2022 00:46:39 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 30 May 2022 00:46:39 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2601:3c3:400:b30:5bbb:11d1:c956:9424; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 2601:3c3:400:b30:5bbb:11d1:c956:9424 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GtkAda's "On_Edited" From: John Perry Injection-Date: Mon, 30 May 2022 07:46:39 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2234 Xref: reader02.eternal-september.org comp.lang.ada:63887 List-Id: > 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.