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-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: GtkAda Problem Date: Sun, 18 Jul 2004 15:17:11 +0100 Message-ID: References: <1udKc.98748$dP1.333832@newsc.telia.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de /pIAF9B+PQF4IXhhrqafow/mdtMRAm0XMeLlZnXQwydRl53/0= User-Agent: Opera M2/7.51 (Win32, build 3798) Xref: g2news1.google.com comp.lang.ada:2217 Date: 2004-07-18T15:17:11+01:00 List-Id: On 18 Jul 2004 12:29:51 +0100, Simon Wright wrote: > Unrestricted_Access Aha! Thank you, Simon. It occurs to me that possibly a better approach would be to declare a library package which interfaces to some external subsystem (e.g. GTK or Win32) as a generic package (even if it has no generic parameters). This way, the user can instantiate the package at the appropriate level (e.g. immediately in the declarative region of the main subprogram), and then use 'Access on subprograms at this level to provide values for access-to-subprogram types declared in the package (e.g. for callbacks). It wouldn't be perfect, but it would actually provide a level (sorry ;-) of protection against accidentally calling back a subprogram in an inner scope that was no longer active, which is what the standard's restrictions on 'Access are intended to do. I'll have a look at my copy of the AARM to see if I can work out whether this would work. I've just discovered that Windows XP is now displaying the task bar 'low' (so that half of it disappears). It's not the monitor. Amazing. Microsoft seem to have a /genius/ for bugs! -- Nick Roberts