Re: Text insertion problem
- From: Gregory S Hayes <syncomm icebreaker net>
- To: gtk-perl-list gnome org
- Subject: Re: Text insertion problem
- Date: Wed, 21 Feb 2001 17:40:58 -0500
Gregory S Hayes wrote:
When inserting text into a textbox I get the following error:
Gtk-CRITICAL **: file gtktext.c: line 879 (gtk_text_set_point):
assertion `index <= TEXT_LENGTH (text)' failed.
I figured it out, see below:
sub on_fileselection_ok_button_clicked {
my $filename = $fileselection->get_filename;
my $index = 0;
$textbox->freeze;
$textbox->delete_text;
open (FILE, $filename);
while (<FILE>) {
$textbox->insert_text($_, $index);
$index = $textbox->get_point();
}
$textbox->thaw;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]