Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection
I've written about this before, but it's come back and I still haven't
found what the problem is.
Basically, in Perl/Tk if a textbox has a lot of text in it (no idea on
the limit yet - all I know is that it has to be a _lot_ of text), and
all the text is selected (and therefore copied to the clipboard) the
entire perl process is halted, the gui disappears and the error:
selection conversion left too many bytes unconverted
appears on the command line.
This appears to be a tcl panic error (hence the cross-post to
comp.lang.tcl as I'm not sure where the problem i...Solution [ Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection ]
After I got bitten enough by this error and found no solution on the
web I had to debug it myself. For me it looks like the following:
- text get selected from Tk::Text
- TkSelPropProc in ./pTk/mTk/unix/tkUnixSelect.c gets called to handle
the selection which determines that the display supports utf-8 and
thus gets Encoding::utf8 as the responsable encoder (see
Encode::Encoding for the interface)
- then it calls Tcl_UtfToExternal to convert the selection from
internal format to utf8, this function is defined in encGlue.c and
just calls CallEncode in the same fil...Weird and downright annoying error: 'selection conversion left too many bytes unconverted'
We recently upgraded our systems including a perl upgrade to version
5.8.7. I've noticed some damn weird things, but so far only one has
If I have a text box with a certain number of characters in it (no idea
how many - the example this is happening with is a few hundred lines
long) and I then select all the text, perl bails (instant tear-down of
the gui) but all that is printed to stderr is:
selection conversion left too many bytes unconverted
A google search finds this is a Tk panic error, but that's about all I
can find. No help in some w...Linux Perl-TK -> Win32 Perl-Tk
I've got an app that I wrote in Perl-Tk for Linux (Redhat)
that I would like to run on my Win32 laptop.
I am not interested in dual-booting this laptop but would like
to get the app up an running.
I'm a perl-Tk hack at best. What is the best/easiest way to port the
On Tue, 21 Dec 2004 03:01:21 +0000, Michael Seningen wrote:
> I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would
> like to run on my Win32 laptop.
> I am not interested in dual-booting this laptop but would like to get
> the ap...Perl/Tk and Tk 8.5
Is there any word on when the enhancements in Tk 8.5 (Tiles, themes,
better-looking widgets) will be made available in the Perl/Tk port? I
know that ActiveState has made some of this available for awhile in the
"Tkx" module, but I'm interested in cross-platform support and am
wondering when 8.5 will be incorporated in the base "Tk" port module.
[Cross-posted to comp.lang.perl.tk with follow-ups set to go there.]
> Is there any word on when the enhancements in Tk 8.5 (Tiles, themes,
> better-looking widgets) will be made available in the P...perl -e "use Tk" failed after installing perl tk
Now I want to debug perl script through ptkdb under Windows XP.
I installed perl tk 804.028 using the below command first because
ptkdb depends on perl tk.
ppm install Tk
But some errors pop out when the command(perl -e "use Tk") exec after
installing perl tk,
Can't locate Tk.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/
lib .) at -e
BEGIN failed--compilation aborted at -e line 1.
ActivePerl: Build 1004
On 19 mai, 15:30, Erik <zhengfen...@gmail.com> wrote:
> Now I want to debug perl script thro...switching Tk::Text / Tk::ROText
thinking about Frank Kulows last posting, I was looking for a way to switch a
Text widget from Text to ROText and backwards. Here is where I ended: It's still
not really satisfactory, because both classes have to be initialized first
(either by calling 'ClassInit' manually or by creating a 'dummy' instance).
Also rebuilding the menu does not look very elegant. This is partial due to the
way Tk::ROText changes the default 'Search' menu, deleting the 'Replace' entry
after initialization instead of providing a Tk::ROText::SearchMenuItems metho...Bug in perl tk (Tk::Tree) ?
This simple script below...
use Tk::widgets qw/Tree ItemStyle/;
my $mw = MainWindow->new();
$mw->fontCreate("MyFont", -family=> 'helvetica',
-size => 9, -weight=>'medium');
my $t = $mw->Tree()->pack();
$t->ItemStyle('imagetext', -stylename => 'foobar',
-activeforeground => '#ff0080', -font => 'MyFont',
$t->add('root', -style => &...Perl/Tk Novice....Tk Error ...Help!
Does anynody know and understand the following Tk error -
Possible precedence problem on bitwise ^ operator at
.../blib/lib/Tk/Scale.pm (autosplit into
.../blib/lib/auto/Tk/Scale/Increment.al) line 242.
I'm trying to get a scale value when I click on the slider. Are there
any simple examples of all the pre-ambles required to set up a slider on
a canvas and capture the input from the user ? Any pointers would
behighly appreciated. Thanks much in advance,
...Porting tk extensions to perl/tk how-to guide
We have a few tk extensions involving direct xlib calls. Is there
any cookbook approach to converting these extensions to perl/tk
extensions, or any general description of the process?
...Tcl/Tk to Perl/TK Translation Problem
I am having problems translating the following tcl/tk code to perl/tk:
============ tcl code ============
label .controls.sizel -text "Size:"
grid .controls.quall .controls.quallo .controls.qual .controls.qualhi
grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg
grid .controls.colorl .controls.color -sticky ew
grid configure .controls.color -columnspan 3
grid configure .controls.quall .controls.sizel .controls.colorl -sticky
grid configure .controls.quallo .controls.sizesm -sticky e
grid configure .controls.qualh...perl tk equivilent to Tcl/Tk fitToContents
Is there a perlTk equivilent to the TclTk fitToContents command you
can run on a window. By default it seems that it automatically dits
to contents for me, until a user does a manual resize, then it stops...
Randell Pelak wrote:
> Is there a perlTk equivilent to the TclTk fitToContents command you
> can run on a window. By default it seems that it automatically dits
> to contents for me, until a user does a manual resize, then it stops...
So once the user sets the window the way they want, you're going to
change it? Not very user friendly. You could just make the ...Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk)
A set of modules that allow easy mixing of code types to be interpretted as
a Tk application...
The input is in MIME-multipart/mixed format, and easy entity can be markdown
in a Text with options to add Tk windows and behaviours), perl (eval()ed),
yaml (structure made available
to app) or menu in yaml (posted on main mindow).
The purpose of this is to contribute to a compiled program (for
Windows/Mac/Linux) that can run appended scripts in this format. The reason
for having this format is that resources can be included in the one file.
The Markdown stuff...Does Ruby/Tk have all features as perl/Tk or java swing?
I am perl and java programmer. I want to make a quite complex
application using a lot GUI components like Spreadsheet, Menu, Tab
etc..in Ruby. I have tried Ruby for some simple non-GUI applications and
really like the language. It will be time consumming if I start to write
software in Ruby and later find out that it lacks this and that. So
someone have worked much with Ruby/Tk can answer my questions.
1. Does Ruby/Tk have all features as perl/Tk or java swing?
2. Does Ruby have features like Java Applet running in a web browser?
3. JRuby is an interpreter that I can run both java and ...