[gtkada] Display problem with Set_Text for Gtk_Label

Xavier Caron xavier.caron at epfl.ch
Tue Nov 21 18:28:35 CET 2000


Good point for you! I put around the Set_Text the ritual instructions, like
that:

      Gdk.Threads.Enter;
      Set_Text (Gtk_Label(Window.Balance_Label), Natural'Image (New_Balance));

      Gdk.Threads.Leave;

and it works! Thanks.

Of course, I have read the section  'Tasking with GtkAda'  of the User Guide
when I begun to use tasks...but it's not very clear for me when to call
Gdk.Threads.Enter.
I had trouble in an other procedure when calling it, so I removed the call to
the two instructions and it was OK, even if it was not in a callback from
GtkAda.
I'd suggest you provide more examples in the next release :)

Xavier

Arnaud Charlet wrote:

> > Does anybody have a similar problem? Is there a known bug with the
> > set_text procedure for a label??
>
> There is known bug in this area.
>
> It looks like your are not protecteing your concurrent calls to Gtk by
> Gdk.Threads as documented in the User's Guide. I'd suggest you look at the
> 'Tasking with GtkAda' section if not already done.
>
> Arno
>
> _______________________________________________
> gtkada mailing list
> gtkada at gtkada.eu.org
> http://gtkada.eu.org/mailman/listinfo/gtkada





More information about the gtkada mailing list