Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Extensibility of Tk::TableMatrix

by elef (Friar)
on Feb 07, 2011 at 12:38 UTC ( #886668=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Extensibility of Tk::TableMatrix
in thread Extensibility of Tk::TableMatrix

Most of this is way over my head, especially $w_t->insert('end', ["row $_;", "$_ bla bla"]) for 'a'..'zzz';. No idea what that may do.
I see your code uses Tcl::Tk, which I've never looked into. I've been playing around with Perl/Tk and implemented some very simple Tk code in the latest release of my script. I'm not sure I want to switch over to Tcl::Tk, but I can't see any mention of the tablelist widget in any Perl/Tk documentation. Tcl::Tk is supposed to be simply be another way to acces the same Tk stuff that one can use with the Tk module, so one would expect the same widgets to be available... I'm getting confused here. Well, who would be better able to clear this up than the Tcl::Tk developer, right?


Comment on Re^4: Extensibility of Tk::TableMatrix
Download Code
Re^5: Extensibility of Tk::TableMatrix
by vkon (Deacon) on Feb 08, 2011 at 15:24 UTC
    I warned that my approach to Tk is a bit different :)

    this line:

    $w_t->insert('end', ["row $_;", "$_ bla bla"]) for 'a'..'zzz';
    is rather simple, it is just looping over a list:
    for my $hh ('a'..'zzz') { $w_t->insert('end', ["row $hh;", "$hh bla bla"]); }
    The great advantage of Tcl::Tk over perl/Tk is that in latter you have only those Tk widgets that are happen to be specially adopted for perl, plus pure-perl widgets (and this is not really much)

    Tcl::Tk gives you all zoo of tcl/tk widgets and provides you with a perl/Tk syntax. It is really thin glue between perl and tcl/tk

      just looping over a list

      I got that (eventually, after posting the question), but I still don't see what it would do. Entering the text into cells would be my guess, but the structure of that command makes no sense to me at all. I guess I will look into the widget's documentation if you think the split/merge features can be coded up with tablelist without devoting the rest of my life to the task.
      Is there any TCL::Tk tutorial you can recommend? Some tablelist sample code would be nice as well.
        this chunk of code:
        $w_t->insert('end', ["row $hh;", "$hh bla bla"]);
        will insert at index 'end' a row into tablelist, values are "row $hh;" and "$hh bla bla" into each of 2 cells appropriately

        this comes into play after seeing sample code at http://wiki.tcl.tk/5527

        .t insert end [list "first row" "another value"] .t insert end [list "another row" "bla bla"]
        Also, Tkx is another way of doing tcl/tk from perl, and for both of these there is a mailing list tcltk@perl.org, which will help you set up and use these approaches

        Regards,
        vkon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://886668]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-12-26 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls