Re: Text Selection Bug in ActiveState W32 Perl?

"Craig M. Votava" <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Organization Lucent Technologies
Message-ID <[email protected]>
I've tried inserting updates at various places, and nothing
seems to matter. It seems that the following is true:

-If the state of the text widget is 'disabled' before
going into mainloop, you'll experience the bug.

-If you change the state to 'normal' after going into
mainloop, everything works as expected.

-If you change the state back to 'disabled' after
going into mainloop, everything works as expected.

Any more pointers/suggestions are appreciated.

Thanks

-Craig

listmail wrote:
> 
> I didn't test this code since i'm not at work, but have you tested some
> $mw->update and/or $text->update calls close to the disable/enable calls
> ?  I've resolved a few unexpected results that way.  The reason I used
> the word "close" is that sometimes I've had to call update before
> something like $widget->see('end') instead of what I believed would be
> logically after....
> 
> Craig M. Votava wrote:
> 
> >Folks-
> >
> >It seems like there are lots of folks verifying
> >this bug. Many are suggesting it's a ptk bug and
> >not an activestate bug. Any suggestions on the
> >best way to report it as a ptk bug? Also, any
> >suggestions for a temporary workaround?
> >
> >Thanks
> >
> >-Craig
> >
> >"Craig M. Votava" wrote:
> >
> >
> >>Folks-
> >>
> >>I think I may have found a bug in the ActiveState W32 Perl
> >>(version 5.8.7 build 813 and before). Please help me verify
> >>it if you can.
> >>
> >>This seems to work fine on unix boxes (SGIs & Suns), but
> >>doesn't work on windows XP & 2000 (and maybe others).
> >>
> >>To verify:
> >>
> >>1.) Run the following program:
> >>use Tk;
> >>
> >>my $mw = MainWindow->new;
> >>my $text = $mw->Scrolled('Text', -state=>'disabled')->pack;
> >>
> >>$text->configure(-state=>'normal');
> >>$text->insert('end',"one\ntwo\nthree\nfor\nfive\nsix\nseven\neight\nnine\nten\n");
> >>$text->configure(-state=>'disabled');
> >>
> >>$mw->Button(
> >>    -text    => "enable",
> >>    -command => sub{$text->configure(-state=>'normal')} )->pack;
> >>
> >>$mw->Button(
> >>    -text    => "disable",
> >>    -command => sub{$text->configure(-state=>'disabled')} )->pack;
> >>
> >>MainLoop;
> >>
> >>2.) Before hitting any buttons, try selecting some text. For me,
> >>        any text that I select is not highlighted (but it is
> >>        selected). THIS IS THE BUG!
> >>
> >>3.) Now, hit the 'enable' button (hitting disable at this point
> >>        doesn't change anything for me). Now select some text. For
> >>        me, selected text is now highlighted.
> >>
> >>4.) Now, hit the 'disable' button, and select some text. For me,
> >>        selected text is still highlighted.
> >>
> >>If others see this problem too, then I will submit the bug
> >>to activestate. If others don't see this bug, let me know too;
> >>maybe it's just me...
> >>
> >>If anybody has a fix, please let me know!
> >>
> >>Thanks
> >>
> >>-Craig Votava
> >>
> >>Lucent Technologies
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.