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,FREEMAIL_FROM, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3af4bf9fdc8875b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-03 11:47:19 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: karlran1234@yahoo.com (Karl Ran) Newsgroups: comp.lang.ada Subject: Re: Getting started with GtkAda & Glade Date: 3 Sep 2001 11:47:18 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 62.104.214.87 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 999542839 5640 127.0.0.1 (3 Sep 2001 18:47:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Sep 2001 18:47:19 GMT Xref: archiver1.google.com comp.lang.ada:12667 Date: 2001-09-03T18:47:19+00:00 List-Id: 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