[gtkada] Display problem with Set_Text for Gtk_Label

Xavier Caron xavier.caron at epfl.ch
Tue Nov 21 17:37:49 CET 2000


I'm in trouble with the Set_Text procedure for a gtk_label.

My program is composed of different tasks, accessing sometimes the same
window. This window has a label and when clicking on a button, one of
the task has to calculate something and change the text of that label by
using the Set_Text procedure...It works fine when clicking one or two
times on the button, but after that, the update of the window is not
done again. The label becomes blank and some others buttons of the
window are not displayed any more until we click on them (the program
doesn't crash, it continues normally, the problem is only with the
update of the display!)

Does anybody have a similar problem? Is there a known bug with the
set_text procedure for a label??


Here is a part of the code that contains the faulty Set_Text:

package body User_Tasks is

   procedure Deposit (Window : User_Win_Access;
                      User : Transactional_User_Ref;
                      Account : Transactional_Account_Ref;
                      Value : Natural) is
      New_Balance : Natural;
      New_Balance := ...;
      Set_Text (Window.Balance_Label, Natural'Image (New_Balance));
   end Deposit;

   task body User_Task_Type is
      Deposit_Value : Natural;
            accept Deposit (Value : in Natural) do
               Deposit_Value := Value;
            end Deposit;
            Deposit (User_Win_Access (My_Window), My_User,
                     My_Account, Deposit_Value);
         end select;
      end loop;
   end User_Task_Type;

end User_Tasks;

Xavier CARON, CS Engineer  |      Software Engineering Lab
  xavier.caron at epfl.ch     | Swiss Federal Inst. of Technology
Mob. (+41) 79 / 623 68 48  |   EPFL-DI-LGL, CH-1015 Lausanne
Off. (+41) 21 / 693 52 43  |            SWITZERLAND
Fax. (+44) 870 / 160 66 92 |URL: http://lglwww.epfl.ch/~xcaron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20001121/62de44f1/attachment.htm 

More information about the gtkada mailing list