CPAN modules
Tcl-0.72.tar.gz and
TclTk-0.72.tar.gz allow connecting to existing Tcl/Tk
installation and these modules are able to provide syntax very similar to perl/Tk.
I wrote this announcement here because of two main reasons:
- to let people try those modules and may be they will provide useful feedback and further ideas.
- (most improtant item) may be volunteers could help me improving documentation of modules
I need help in preparing better and cleaner phrases.
These newly released modules allow Perl users to use newest available Tcl/Tk features plus pure-Tcl widgets but still remaining in usual perlTk syntax.
Usually the only distinction is using use Tcl::Tk qw(:perlTk); instead of use Tk;.
(sometimes several modifications of perlTk code still necessary, but I hope this will be improved in the future)
Here is an example:
use Tcl::Tk qw(:perlTk);
$mw = MainWindow->new;
$mw->Label(-text => "Hello world")->pack;
$btn = $mw->Button(-text => "test", -command => sub {
$btn->configure(-text=>"[". $btn->cget('-text')."]");
})->pack;
$edt = $mw->Text()->pack;
$edt->insert('end',"\x{2456}\x{2457}");
MainLoop;
While there are still some places to improve and even DEBUG information appearing, there's not much work remains to do, and I am planning finishing it within couple of weeks.
Actually size of Tcl::Tk is rather small, and most of actual processing is performed on Tcl side.
Examples occupy a lot of space inside distribution, but module itself is small.
Courage, the Cowardly Dog
PS. I am also thinking about allowing to use pure-perl widgets in Tcl::Tk, but currently I can't guarantee anything on this.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.