From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d50803f457a25d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, sv-se, sv-fi, en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GtkAda Problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: <1udKc.98748$dP1.333832@newsc.telia.net> Date: Sat, 17 Jul 2004 17:38:05 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1090085885 217.209.116.179 (Sat, 17 Jul 2004 19:38:05 CEST) NNTP-Posting-Date: Sat, 17 Jul 2004 19:38:05 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:2209 Date: 2004-07-17T17:38:05+00:00 List-Id: Oliver Doerler wrote: > fidle_id :=3D Gtk.Main.Idle_Add (fidle'access); >=20 > gnatmake Message: > =3D>subprogram must not be deeper than access type Did you declare fidle inside the main subprogram? Move it to a package.=20 Idle_Callback is defined on what is called the library level. It's not=20 allowed to point to something on a deeper level, and what's inside a=20 subprogram is deeper. The rule is there to prevent pointers from=20 pointing to something that can go out of scope and disappear before the=20 pointer goes out of scope. I think most beginners try to do this and get confused. I know I did. --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu