From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31e24749747ccfc9,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-03 06:03:48 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: gilmour@banda.lv (gilmour) Newsgroups: comp.lang.ada Subject: Access check failed Date: 3 Jan 2004 06:03:48 -0800 Organization: http://groups.google.com Message-ID: <4138e9c3.0401030603.9a4fe6e@posting.google.com> NNTP-Posting-Host: 213.182.215.133 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1073138628 5778 127.0.0.1 (3 Jan 2004 14:03:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 3 Jan 2004 14:03:48 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:4073 Date: 2004-01-03T06:03:48-08:00 List-Id: Why when I press 'Insert' button, following error appears? "CONSTRAINT_ERROR: win_new_employee_pkg.ads:25 access check failed" I'am using GtkAda-2.2.0 --package Win_New_Employee_Pkg.Callbacks with Gtk.Arguments; with Gtk.Widget; use Gtk.Widget; package Win_New_Employee_Pkg.Callbacks is procedure On_Btninsert_Pressed (Object : access Gtk_Button_Record'Class); end Win_New_Employee_Pkg.Callbacks; --package body Win_New_Employee_Pkg.Callbacks with System; use System; with Glib; use Glib; with Gdk.Event; use Gdk.Event; with Gdk.Types; use Gdk.Types; with Gtk.Accel_Group; use Gtk.Accel_Group; with Gtk.Object; use Gtk.Object; with Gtk.Enums; use Gtk.Enums; with Gtk.Style; use Gtk.Style; with Gtk.Widget; use Gtk.Widget; with Ada.Text_Io; use Ada.Text_Io; with Win_New_Employee_Pkg; use Win_New_Employee_Pkg; package body Win_New_Employee_Pkg.Callbacks is use Gtk.Arguments; -------------------------- -- On_Btninsert_Pressed -- -------------------------- procedure On_Btninsert_Pressed(Object : access Gtk_Button_Record'Class)is begin Set_Text(win_new_employee.entry3, ""); end On_Btninsert_Pressed; end Win_New_Employee_Pkg.Callbacks; --package Win_New_Employee_Pkg with Gtk.Window; use Gtk.Window; with Gtk.Fixed; use Gtk.Fixed; with Gtk.GEntry; use Gtk.GEntry; with Glib.Unicode; use Glib.Unicode; with Gtk.Label; use Gtk.Label; with Gtk.Button; use Gtk.Button; package Win_New_Employee_Pkg is type Win_New_Employee_Record is new Gtk_Window_Record with record Fixed2 : Gtk_Fixed; Entry1 : Gtk_Entry; Entry2 : Gtk_Entry; Entry3 : Gtk_Entry; Label_Surname : Gtk_Label; Label_Name : Gtk_Label; Label_Code : Gtk_Label; Btn_Cancel : Gtk_Button; Btn_Insert : Gtk_Button; end record; type Win_New_Employee_Access is access Win_New_Employee_Record'Class; procedure Gtk_New (Win_New_Employee : out Win_New_Employee_Access); procedure Initialize (Win_New_Employee : access Win_New_Employee_Record'Class); Win_New_Employee : Win_New_Employee_Access; end Win_New_Employee_Pkg; --package body Win_New_Employee_Pkg with Glib; use Glib; with Gtk; use Gtk; with Gdk.Types; use Gdk.Types; with Gtk.Widget; use Gtk.Widget; with Gtk.Enums; use Gtk.Enums; with Gtkada.Handlers; use Gtkada.Handlers; with Callbacks_Third; use Callbacks_Third; with Third_Intl; use Third_Intl; with Win_New_Employee_Pkg.Callbacks; use Win_New_Employee_Pkg.Callbacks; package body Win_New_Employee_Pkg is procedure Gtk_New (Win_New_Employee : out Win_New_Employee_Access) is begin Win_New_Employee := new Win_New_Employee_Record; Win_New_Employee_Pkg.Initialize (Win_New_Employee); end Gtk_New; procedure Initialize (Win_New_Employee : access Win_New_Employee_Record'Class) is pragma Suppress (All_Checks); begin Gtk.Window.Initialize (Win_New_Employee, Window_Toplevel); Set_Title (Win_New_Employee, -"New employee"); Set_Position (Win_New_Employee, Win_Pos_None); Set_Modal (Win_New_Employee, False); Gtk_New (Win_New_Employee.Fixed2); Add (Win_New_Employee, Win_New_Employee.Fixed2); Gtk_New (Win_New_Employee.Entry1); Set_Editable (Win_New_Employee.Entry1, True); Set_Max_Length (Win_New_Employee.Entry1, 0); Set_Visibility (Win_New_Employee.Entry1, True); Put (Win_New_Employee.Fixed2, Win_New_Employee.Entry1, 112, 8); Gtk_New (Win_New_Employee.Entry2); Set_Editable (Win_New_Employee.Entry2, True); Set_Max_Length (Win_New_Employee.Entry2, 0); Set_Visibility (Win_New_Employee.Entry2, True); Put (Win_New_Employee.Fixed2, Win_New_Employee.Entry2, 112, 32); Gtk_New (Win_New_Employee.Entry3); Set_Editable (Win_New_Employee.Entry3, True); Set_Max_Length (Win_New_Employee.Entry3, 0); Set_Visibility (Win_New_Employee.Entry3, True); Put (Win_New_Employee.Fixed2, Win_New_Employee.Entry3, 112, 56); Gtk_New (Win_New_Employee.Label_Surname, -("Surname")); Set_Alignment (Win_New_Employee.Label_Surname, 0.5, 0.5); Set_Padding (Win_New_Employee.Label_Surname, 0, 0); Set_Justify (Win_New_Employee.Label_Surname, Justify_Left); Set_Line_Wrap (Win_New_Employee.Label_Surname, False); Set_Selectable (Win_New_Employee.Label_Surname, False); Set_Use_Markup (Win_New_Employee.Label_Surname, False); Set_Use_Underline (Win_New_Employee.Label_Surname, False); Put (Win_New_Employee.Fixed2, Win_New_Employee.Label_Surname, 8, 32); Gtk_New (Win_New_Employee.Label_Name, -("Name")); Set_Alignment (Win_New_Employee.Label_Name, 0.5, 0.5); Set_Padding (Win_New_Employee.Label_Name, 0, 0); Set_Justify (Win_New_Employee.Label_Name, Justify_Center); Set_Line_Wrap (Win_New_Employee.Label_Name, False); Set_Selectable (Win_New_Employee.Label_Name, False); Set_Use_Markup (Win_New_Employee.Label_Name, False); Set_Use_Underline (Win_New_Employee.Label_Name, False); Put (Win_New_Employee.Fixed2, Win_New_Employee.Label_Name, 8, 8); Gtk_New (Win_New_Employee.Label_Code, -("Code")); Set_Alignment (Win_New_Employee.Label_Code, 0.5, 0.5); Set_Padding (Win_New_Employee.Label_Code, 0, 0); Set_Justify (Win_New_Employee.Label_Code, Justify_Left); Set_Line_Wrap (Win_New_Employee.Label_Code, False); Set_Selectable (Win_New_Employee.Label_Code, False); Set_Use_Markup (Win_New_Employee.Label_Code, False); Set_Use_Underline (Win_New_Employee.Label_Code, False); Put (Win_New_Employee.Fixed2, Win_New_Employee.Label_Code, 8, 56); Gtk_New (Win_New_Employee.Btn_Cancel, -"Cancel"); Set_Relief (Win_New_Employee.Btn_Cancel, Relief_Normal); Put (Win_New_Employee.Fixed2, Win_New_Employee.Btn_Cancel, 344, 272); Gtk_New (Win_New_Employee.Btn_Insert, -"Insert"); Set_Relief (Win_New_Employee.Btn_Insert, Relief_Normal); Put (Win_New_Employee.Fixed2, Win_New_Employee.Btn_Insert, 288, 272); Button_Callback.Connect (Win_New_Employee.Btn_Insert, "pressed", Button_Callback.To_Marshaller (On_Btninsert_Pressed'Access), False); end Initialize; end Win_New_Employee_Pkg;