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...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...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 => &...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...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...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 ...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,
...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...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?
...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...compiling perl/tk widget (outside tk) on win32 ?
i've got a problem, i have my external perl/tk widget, partially
written in C
it works well on linux
when compiling, i'm using Tk::MMutil::TkExtMakefile to build make
file; it somehow recognizes that i'm compiling the widget outside of
Tk itself, at the end it produces Plotviewer.sl dynamic library
when compiling on win32 (win xp, vc60), i get the same message when
building makefile (that it recognized that i'm building the widget
outside of Tk itself) but then it fails
first problem is that it tries to create pTk.dll; not Plotviewer.dll;
second prob...Tk::send & Tk::Receive
One of my apps sends tcl/tk script bits to our mail client (ExMH) so it
can make ExMH pop up message composition windows.
I need to write a small helper stub that does the same, but that doesn't
itself have a GUI. It also needs to be as small as possible (memory
Does anyone know a way to send data to active Tcl programs like Tk::send
but without perl/Tk?
On Fri, 21 Jul 2006 15:34:45 +1000, Matthew Braid <firstname.lastname@example.org>
>One of my apps sends tcl/tk script bits to our mail client (ExMH) so it...