Does anyone know of an online tutorial that talks about the use of the
Tcl::Tk module with. I have looked at the manpages and the documentation in Tcl.pm and Tk.pm
The examples in there work quite happily, but I am getting stuck with creating entry widgets
and using a button to e.g. disply the sum of two numbers entered.
The funny thing is that I can write the correct script for wish.
Perl (bless it's heart :)) does not seem to like things like;
entry(".e", -textvariable => var1);
entry(".e2, -textvarible => var2);
entry(".e3", -textvariable => var3);
button(".b", -command => {set var3 [expr $var1 + $var2]});
tkpack ".e";
tkpack ".e2";
tkpack ".e3";
tkpack ".b";
MainLoop;
Take all the perl bits out and you have a wish script that works perfectly.
Perl complains (under -w switch) that var1 and var2 are used once only and that var3 is not initialised.
If anyone could give me some pointers I would be eternally grateful.
Regards to all Perl Monks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.