From: DrPi <314@drpi.fr>
Subject: GtkAda : Trying to derive a widget
Date: Thu, 8 Apr 2021 21:27:51 +0200 [thread overview]
Message-ID: <606f5938$0$27421$426a74cc@news.free.fr> (raw)
Hi,
I'm trying to create a GtkAda widget derived from a standard widget.
-- debug_panel.ads
with Gtk.Scrolled_Window; use Gtk.Scrolled_Window;
with Gtk.Text_View; use Gtk.Text_View;
package Debug_Panel is
type Debug_Panel_Record is new Gtk_Scrolled_Window_Record with private;
type Debug_Panel is access all Debug_Panel_Record'Class;
procedure Gtk_New (Panel : in out Debug_Panel);
procedure Initialize (Panel : not null access Debug_Panel_Record'Class);
private
type Debug_Panel_Record is new Gtk_Scrolled_Window_Record with record
Text : Gtk_Text_View;
end record;
end Debug_Panel;
-- debug_panel.adb
package body Debug_Panel is
procedure Gtk_New (Panel : in out Debug_Panel) is
begin
Panel := new Debug_Panel_Record;
Initialize (Panel);
end Gtk_New;
procedure Initialize (Panel : not null access
Debug_Panel_Record'Class) is
begin
Gtk.Scrolled_Window.Initialize (Panel);
-- Init other widgets
end Initialize;
end Debug_Panel;
When compiling, I get the following error :
debug_panel.adb:6:07: ambiguous expression (cannot resolve "Initialize")
debug_panel.adb:6:07: possible interpretation at debug_panel.ads:15
debug_panel.adb:6:07: possible interpretation at gtk-scrolled_window.ads:92
The solution might be obvious but I don't understand why this error is
raised by the compiler.
Any help much appreciated.
Nicolas
next reply other threads:[~2021-04-08 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 19:27 DrPi [this message]
2021-04-08 22:27 ` GtkAda : Trying to derive a widget Dmitry A. Kazakov
2021-04-09 5:28 ` DrPi
2021-04-09 6:12 ` J-P. Rosen
2021-04-09 11:32 ` DrPi
2021-04-09 6:18 ` Dmitry A. Kazakov
2021-04-09 11:42 ` DrPi
2021-04-09 12:23 ` Dmitry A. Kazakov
2021-04-09 13:37 ` DrPi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox