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 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: richardthiebaud Newsgroups: comp.lang.ada Subject: What does this error mean and how do I correct this? Date: Fri, 1 Sep 2023 17:04:16 -0400 Organization: A noiseless patient Spider Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 1 Sep 2023 21:04:16 -0000 (UTC) Injection-Info: dont-email.me; posting-host="3b6b747f69f64fd10b8d64112b94ba09"; logging-data="26861"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EOyYoJDoNmUERtpEQLsFeO/Q108Pxh/k=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cancel-Lock: sha1:xAB0xCgb0IDWrrv9UzHyi5eIUD4= Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65579 List-Id: in the following program: with Gtk.Enums; use Gtk.Enums; with Gtk.Main; with Gtk.Window; with Gdk; with Gdk.Event; with Glib; with Glib.Object; procedure test1 is Win : Gtk.Window.Gtk_Window; function Handler (Self : access Glib.Object.GObject_Record'Class; Event : Gdk.Event.Gdk_Event_Button) return Boolean is begin Gtk.Main.Main_Quit; return True; end Handler; -- -- defined in gtk-widget.ads -- -- type Cb_GObject_Gdk_Event_Button_Boolean is not null access function -- (Self : access Glib.Object.GObject_Record'Class; -- Event : Gdk.Event.Gdk_Event_Button) return Boolean; begin -- Gtk.Init; Gtk.Main.Init; Gtk.Window.Gtk_New (Window => Win, The_Type => Gtk.Enums.Window_Toplevel); Win.Set_Position (Win_Pos_Center); Gtk.Window.Set_Title (Window => Win, Title => "Editor"); Gtk.Window.Show_All (Win); Win.On_Button_Press_Event <------------ line that gets the error (Call => Handler'Access, After => False, Slot => Win); Gtk.Main.Main; end test1; I get the compiler error message: test1.adb:32:17: subprogram must not be deeper than access type What does this mean and how can I correct it?