[gtkada] Callback to filter keys.

Ludovic Brenta ludovic.brenta at insalien.org
Sun Feb 23 20:32:39 CET 2003


I think I've found a solution.  The first parameter to your handler must
not be a Num_Entry_Access, but an "access Num_Entry_Record'Class".  Even
though you might say these are one and the same, the compiler
disagrees.  I suspect this is because Num_Entry_Access has a smaller
visibility scope than "access Num_Entry_Record'Class".  Thus, the
following compiles:

function Check_Keys (Num_Entry : access Num_Entry_Record'Class;
                     Event : Gdk_Event_Key) return boolean;

HTH

Could someone with a better understanding of Ada shed some light on the
reason why this works and not Num_Entry_Access?

--
Ludovic Brenta.





More information about the gtkada mailing list