comp.lang.ada
 help / color / mirror / Atom feed
From: Matthias Teege <matthias-dated@mteege.de>
Subject: access check failed
Date: 3 Sep 2004 12:11:46 GMT
Date: 2004-09-03T12:11:46+00:00	[thread overview]
Message-ID: <2pr5c2Fmujq4U1@uni-berlin.de> (raw)

Moin,

I'm playing with gtk ada and try to integrate some code borrowd from
another gtkada project. The code push messages to the statusbar. It
looks like that:

procedure call_statusbar (text : in string)
is
     my_id   : context_ID := Get_Context_ID(Window1.statusbar1,"Hallo");
     message : message_ID;
begin
     message := Push(Window1.statusbar1,my_id,text);
end call_statusbar;

Now I try to use this procedure in callback procedure:

   procedure On_Combo5_Realize
     (Object  : access Gtk_Combo_Record'Class;
      Params  : Gtk.Arguments.Gtk_Args;
      Window1 : Window1_Access)
   is
      Combo_Items : String_List.Glist;
   begin
      Gadra.Fill_Combo(Window1.Connection.ALL, Combo_Items,"mdt","lnd");
      Combo.Set_Popdown_Strings (Window1.Combo5, Combo_Items);
      Free_String_List (Combo_Items);
      Call_Statusbar("Hello");
   end On_Combo5_Realize;

The code compiles but if I try to run it, it gives me

./window1

(window1:5678): Gtk-WARNING **: Invalid input string
*** NOTICE : WARNING:  there is no transaction in progress

raised CONSTRAINT_ERROR : window1_pkg.ads:142 access check failed

window1_pkg.ads:142 looks like that

....
      Label4 : Gtk_Label;
      Statusbar1 : Gtk_Statusbar;
      Connection : Connection_Access;
   end record;
   type Window1_Access is access all Window1_Record'Class;

   procedure Gtk_New (Window1 : out Window1_Access);
   procedure Initialize (Window1 : access Window1_Record'Class);

L142->   Window1 : Window1_Access;
end Window1_Pkg;

If I remove the call_statusbar call the programm runs. What is the
"access check" and why does it fail?

Thanks
Matthias

-- 
Matthias Teege -- http://www.mteege.de
make world not war



             reply	other threads:[~2004-09-03 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 12:11 Matthias Teege [this message]
2004-09-03 21:19 ` access check failed Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2004-01-03 14:03 Access " gilmour
2004-01-03 18:51 ` Stephen Leake
2004-01-04 13:31   ` gilmour
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox