[gtkada] Separating Custom Callback Code (Patches included)

Emmanuel Briot briot at ACT-Europe.FR
Mon Dec 24 10:13:52 CET 2001


"Warren W. Gay VE3WWG" <ve3wwg at cogeco.ca> writes:

> To make this "life cycle" more reliable, I would like to propose the following
> change:
> 
> In the file main_win_pkg-callbacks.adb (for example), just generate the
> callback procedures and functions with the clause "is separate". For
> example:


Interesting idea, and thanks for the patch, it might indeed interest some
people on the list.
However, I see several problems with this approach too:
  - First, some people might be put off by the fact that you need so many extra
    source files, at least with the standard GNAT naming scheme (one file per
    callback, which for big applications means tens of files.

  - How do you handle changes in the profile of subprograms (for instance
    because the user has decided that he wants to use a user_data with the
    callback after all) ?
    These changes are apparently completely dropped in this case. Admittedly,
    glade/gate will generate a proper *.ads file, and the user's old version of
    the body will not match the profile in the spec, but it requires possibly
    quite a lot of manual modifications from the user.

regards
Emmanuel




More information about the gtkada mailing list