Connecter un signal : ça compile mais ça passe pas à l'exécution. [GtkAda]
Bonjour,
J'ai un problème avec une connexion avec des pointeur :
La souche du type pointé :
Code:
1 2 3 4 5 6
| package Arch is
pragma Pure (Arch);
type Interfaces_Type is (Graphical, Textual);
type Arch_Interface_Type(Context : Interfaces_Type) is abstract tagged limited null record; |
Le pointeur :
Code:
1 2 3 4 5 6 7
|
with System.Address_To_Access_Conversions;
package Arch.pointers is
package Arch_Conversion is new System.Address_To_Access_Conversions(Arch_Interface_Type'class);
subtype Arch_Pointer is Arch_Conversion.Object_Pointer;
end Arch.Pointers; |
Ma procédure en cours :
Code:
1 2 3 4 5 6 7 8 9 10
| type Main_Window_Type is access all Main_Window_Record'Class;
type GtkAda_Interface_Record(Computer : access Ai.Computer_Type) is new Arch_Interface_Type(Graphical) with
record
Main_Window : Main_Window_Type;
end record;
procedure GtkAda_Initialize (GtkAda_Interface : in out Arch.Pointers.Arch_Pointer; Quiet : in Boolean; Errno : out Integer); |
GtkAda_Interface : in out Arch.Pointers.Arch_Pointer;
La connexion :
Code:
1 2 3 4 5
|
Common_Notebook_Cb.Connect
(GtkAda_Interface_Record(GtkAda_Interface.all).Main_Window.Book, "switch_page",
Common_Notebook_Cb.To_Marshaller (Page_Switch'Access),
Arch.Pointers.Arch_Conversion.To_Address(GtkAda_Interface)); |
J'espère que vous pourrez m'aider. Merci !