[gtkada] Help! GtkAda-2.2.0 Callback with Arguments Confusion

Manuel Op de Coul manuel.op.de.coul at eon-benelux.com
Wed Aug 25 11:05:40 CEST 2004


There is no marshaller in Gtkada for this parameter
profile. You're probably the first one to use this event
in Ada.
The solution is to not use a marshaller and declare
your callback like this:


 function Traverse_CB
   (Object : access Gtk_Sheet_Record'Class;
    Params : Gtk.Arguments.Gtk_Args) return Boolean;

Then

  Sheet_Callback_Rtn.Connect(M.Sheet, "traverse",
    Traverse_CB'Access), False);

In the body of Traverse_CB retrieve the four parameters
from Params with Gtk.Arguments calls.
Use System.Address_To_Access_Conversions to convert System.Address
returned by To_Address to Gint_Access.
And use Unchecked_Conversion if necessary.

Manuel





More information about the gtkada mailing list