[gtkada] Handle signals inside a tagged record
    Preben Randhol 
    randhol at pvv.org
       
    Sun Feb 16 11:47:02 CET 2003
    
    
  
Martin Klaiber <martinkl at zedat.fu-berlin.de> wrote on 16/02/2003 (11:35) :
> Hi,
Hei
> Is there any way to handle such events within the tagged record? I
> couldn't manage yet, but I am only a beginner in GtkAda.
Why can't you simply do: 
   Handlers.Connect (Ok_Button, "clicked", 
      Handlers.To_Marshaller (Update'Access));
   procedure Update (Example : access Gtk_Button_Record'Class) is
   begin
     A_Variable_Somewhere := Integer'Value (Get_Text (Entry1));
     Another_Variable := Integer'Value (Get_Text (Entry2));
   
   -- I would add a exception handler here as you cannot know if the
   -- Entries have numbers or tekst.
   -- You could also use Spin_buttons perhaps?
   end Update;
Can you elaborate a bit more what it is you want the program to do when
you click on the Button.
-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 «For me, Ada95 puts back the joy in programming.»
    
    
More information about the gtkada
mailing list