comp.lang.ada
 help / color / mirror / Atom feed
From: karlran1234@yahoo.com (Karl Ran)
Subject: Re: Getting started with GtkAda & Glade
Date: 3 Sep 2001 11:47:18 -0700
Date: 2001-09-03T18:47:19+00:00	[thread overview]
Message-ID: <e7ebd224.0109031047.20c61253@posting.google.com> (raw)
In-Reply-To: m3ofosvhqo.fsf@lyon.act-europe.fr

Hi Emmanuel,

>Yes, try something like:    declare
>      Scale : Gtk_Scale := Gtk_Scale (Object);
>   begin
>      Put_Line ("Current_Value is "
>                & Gdouble'Image (Get_Value (Scale)));
>   end;
   
I played a little bit with your suggestions but I haven't found a
solution for
for my problem ... due to my lack of Ada/Gtk knowledge., I guess

Ok, now the code looks like this:

-----------------------------------------------------------------------
   function On_Hscale1_Motion_Notify_Event
     (Object : access Gtk_Widget_Record'Class;
      Params : Gtk.Arguments.Gtk_Args) return Boolean
   is
      Arg1  : Gdk_Event := To_Event (Params, 1);
      Scale : Gtk_Scale := Gtk_Scale (Object);  
   begin
     Put_Line ("Current_Value is " & Gdouble'Image (Get_Value
(Scale)));
     return False;
   end On_Hscale1_Motion_Notify_Event;
------------------------------------------------------------------------
Now I get this message:

gcc -c -gnatf -I/usr/local/include/gtkada window1_pkg-callbacks.adb
window1_pkg-callbacks.adb:27:64: expected type access to
"Gtk_Adjustment_Record" defined at gtk-adjustment.ads:97
window1_pkg-callbacks.adb:27:64: found type "Gtk_Scale" defined at
gtk-scale.ads:40
window1_pkg-callbacks.adb:27:64:   ==> in call to "Get_Value" at
gtk-adjustment.ads:97
gnatmake: "window1_pkg-callbacks.adb" compilation error

Any help would be appreciated..

Karl



  reply	other threads:[~2001-09-03 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-31 12:37 Getting started with GtkAda & Glade Karl Ran
2001-09-03  7:48 ` Emmanuel Briot
2001-09-03 18:47   ` Karl Ran [this message]
2001-09-05  8:43     ` Emmanuel Briot
replies disabled

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