[gtk-list] GTK--: Bug in Gtk_Text (was: How do I add some text to a Gtk_Text ?)



Ionut Borcoman at home wrote:
> 
> I'm trying to write something in my Gtk_Text and the result is that the
> Gtk_Text appear as an separate window !?! What's funny is that this
> window rescales itself when the container that keeps it rescales, even
> that they are separate windows (the place in the container, a HBox,
> where the text box should be is empty). If I close the window that keeps
> the Gtk_Text, I get this:
> 
> ** ERROR **: an x io error occurred
> make: *** [run] Aborted
> 
> or
> 
> ** ERROR **: sigint caught
> 
> I've attached a simple code that produces this.
> The code try to read the file ".modelrc" and show it in the Gtk_Text.
> 

I just realized that this behaviour should be called a _BUG_. The
solution with putting show() as the first line of the widget constructor
works, but also shows  the window when you declare it; I even don't need
to call the show() in the main() function. What if I have more windows
and whant to see only some of them (or just one) ? With this kind of
hack, I am forced to wait to declare the widget till I want to show it !

My solution, which inserts the text after the window was shown, works
better and it is more in the spirit of gtk+, but you need to write some
extra code that should not be needed at all ! Gtk-- is meant to help us
not to make us write extra code !!! 

Am I wrong or not ? What the experts are saying ?

TIA,

Ionutz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]