text widget problem





  Hello, I keep getting the following error message (and a crash) when I
try to type/delete characters into/from a text widget which has been set
editable:


** ERROR **: file gtktext.c: line 2832 (find_line_params):
"lp.end.property"
IOT trap/Abort                                       

  It would seem likely that this is an error on my part, but I used the
testgtk source as an example, and cannot find any differences. If anyway
has encountered this and knows offhand what the problem could be, that
would be really cool. 

--<snip>----

	/* create a new window */
	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_widget_set_usize (window, 640,400);
	gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (delete_event),NULL);
	gtk_container_border_width (GTK_CONTAINER (window), 2);

		
	/* create vertical box - contains all */
	vbox = gtk_vbox_new (FALSE, 0);
    	gtk_container_add (GTK_CONTAINER (window), vbox);
	gtk_container_border_width (GTK_CONTAINER (vbox), 2);
    	gtk_widget_show (vbox);
		

	/* create the text widget */
	table = gtk_table_new (1, 2, FALSE);
	gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
	gtk_widget_show (table);

	text = gtk_text_new (NULL, NULL);
	gtk_text_set_editable (GTK_TEXT (text), TRUE);
	gtk_table_attach_defaults (GTK_TABLE (table), text, 0, 1, 0, 1);
	gtk_widget_show (text);


	vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
	gtk_table_attach (GTK_TABLE (table), vscrollbar, 1, 2, 0, 1,
			GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
	gtk_widget_show (vscrollbar);
	gtk_text_freeze (GTK_TEXT (text));
	gtk_widget_realize (text);
	gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL, "This is a line of text", -1);
	gtk_text_thaw (GTK_TEXT (text));

	/* show window */
	gtk_widget_show (window);



____________________________________________________________________
Thomas Ledbetter                  _/      _/  _/_/_/  _/  _/  _/  _/
tledbett@revelstone.net          _/      _/  _/  _/  _/  _/    _/
                                _/_/_/  _/  _/  _/  _/_/_/  _/  _/

 'The apparent randomness with which the universe presents itself,
  is proof that it operates on an inherent higher order.'
   



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