[gtkada] Addressing external data in a GUI

Rick Duley 30294025 at student.murdoch.edu.au
Tue May 31 09:57:18 CEST 2005


Hi Emmanuel

I _have_ been reading the GtkAda User's Guide and I _have not_ been able to
figure out how to pass program data to and from the User Interface.

The only solution apparent to me is to pass aliased access types to the 
relevant
packages and to access them globally from the callbacks.  This does not appear
to me to be sound Ada practice, but I cannot see any other way.

What I _would_ appreciate is direction to the relevant part of the UG - 
which I
have obviously overlooked - and, perhaps, an accessible example of how the
technique is employed.

I am sure there must be something there.
It is just that I can't see it.

All help much appreciated.

Cheers
-------------------------------------------
"Professional qualitative judgement
    consists in knowing the rules
      for using (or occasionally breaking)
        the rules."
                             D. Royce Sadler
-------------------------------------------
Rick Duley
Murdoch University
School of Engineering Science
Perth, Western Australia
http://eng.murdoch.edu.au/~rick
aussie : 040 910 6049                .-_|\
o'seas : + 61 40 910 6049           /     \
                               perth *_.-._/
                                          v


Quoting Emmanuel Briot <briot at adacore.com>:

>> GtkAda imports C routines.  Therefore: the only way to address data 
>> from (say)
>> callbacks is to have a public (global in C) access type (pointer in 
>> C) to the
>> data visible to the callback.  In other words, write Ada code to 
>> pull C tricks!
>
> No.
> I would recommend that you read the GtkAda User's guide to get to know
> the technology better before asking these questions.
>
> regards,
> Emmanuel
>





More information about the gtkada mailing list