comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: gtkada3 callback function & failure : subprogram must not be deeper than access type
Date: Fri, 1 Nov 2019 11:47:28 -0700 (PDT)
Date: 2019-11-01T11:47:28-07:00	[thread overview]
Message-ID: <e4b9d00a-6eb9-4c12-bc12-7e6383f9fe11@googlegroups.com> (raw)
In-Reply-To: <eaff9b38-2379-476b-ac3e-67e756b10dbf@googlegroups.com>

Move the On_Button_Click procedure to its own file (on-button-click.ads or something) and add "With On_Button_Click;" to your hello_gtk procedure.

The reason for the error "subprogram must not be deeper than access type" is because the subprogram's access-level is inside the scope of hello_gtk, but the parameter's access-type exceeds that scope: IOW, the access failure is to prevent the dangling-pointer situation where hello_gtk finishes and therefore leaves the scope (thus invalidating the reference to On_Button_Click).


  reply	other threads:[~2019-11-01 18:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 18:30 gtkada3 callback function & failure : subprogram must not be deeper than access type Alain De Vos
2019-11-01 18:47 ` Shark8 [this message]
2019-11-01 18:57 ` Dmitry A. Kazakov
replies disabled

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