in reply to Who can give an example of Tkx :: ttk__treeview to me?

See "Feet to Meters, Object Style" in http://www.tkdocs.com/tutorial/onepage.html and use that style of programming, its less typing, and its what that example you linked for "adding" is using

mwahaha

Did you know Tk is available via ppm? so there is absolutely no reason to learn Tkx.

*tips* Re: use Tkx & busy/unbusy ( $mw->g_tk_busy ), Re: a perl tkx GUI, Re^5: a perl tkx GUI, Limitations with Tkx configure options?, Re: Tkx Optionmenu,Re^3: [Tkx] Search for dialog box for text input

  • Comment on Re: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style)

Replies are listed 'Best First'.
Re^2: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style)
by bulk88 (Priest) on Jan 30, 2014 at 00:28 UTC
    Tk is old, and is a butchered dead end fork of TK from 15 years ago that separated Tk from the Tcl interp. Tkx is an marshalling bridge to a real Tcl/Tk engine. All bug fixes in Tcl/Tk interp automatically appear in Tkx. So do all new APIs.

      bulk88 says: Tk is old, and is a butchered dead end fork of TK from 15 years ago that separated Tk from the Tcl interp. Tkx is an marshalling bridge to a real Tcl/Tk engine. All bug fixes in Tcl/Tk interp automatically appear in Tkx. So do all new APIs.

      boring and not relevant at all , and not a reason to learn Tkx

      Even if everything you said about Tk is 100% true, and even if it were 100% important, Tk is still a milion times better than Tkx -- Tkx is the worst possible option

      I've seen you remark on Tkx before, but I've not seen you write any Tkx code for people (or Tk for that matter)

      Anyway, the OP is struggling with the basics, he won't be able to discover any of these bugs you speak of , that are irrelevant for most Tk users

        I can't comment on Tkx as I never used it, but I must say to advise avoiding Tk just because it is older is wrong. I prefer the Stability of it. :-) It's nice not having your API change every 2 years as someone tries to add some whizbang features!! For many simple tasks, Tk is the way to go for it's ease of use and good documentation.... just like Perl5 itself.

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku ................... flash japh
        I have written Tkx, removed business logic from example.
        #!/usr/bin/perl -w BEGIN { $ENV{PERL_TCL_DLL} = 'C:\Program Files\Tcl\bin\tcl85t.dll'; } use Tkx; #print Tkx::package_require( 'platform'); #print "\n"; #print Tkx::platform__identify(); # print "\n"; #print Tkx::info_loaded(); # print "\n"; #print Tkx::info_nameofexecutable(); #Tcl::DL_PATH my $mw = Tkx::widget->new("."); $mw->new_button( -text => "Run", -command => sub { LXS::EnumState(2000); $mw->g_destroy; }, )->g_pack; Tkx::MainLoop();
        # GUIBuildertkx.pl -- # # UI generated by GUI Builder Build 146 on ################REMOVED#### +################## from: ################REMOVED###################### # This file is auto-generated. Only the code within # '# BEGIN USER CODE' # '# END USER CODE' # and code inside the callback subroutines will be round-tripped. # The subroutine name 'ui' is reserved. # # Declare the package for this dialog package GUIBuildertkx; BEGIN { $ENV{PERL_TCL_DLL} = 'C:\Program Files\Tcl\bin\tcl85t.dll'; } # Locate this script so we can load the ui module use FindBin qw($RealBin); use lib $RealBin; use GUIBuildertkx_ui; ################REMOVED###################### use String::Escape qw( backslash ); ################REMOVED###################### sub ################REMOVED###################### { my ($result, $error) = ($_[1], $_[2]); if($result){ if(################REMOVED######################) { ################REMOVED###################### Tkx::update('idletasks'); return 1; } else{ ################REMOVED###################### closed($_[0]); ################REMOVED###################### } sub closed { ################REMOVED###################### $_button_1->configure('-text', 'Start'); } sub InetCB{ ################REMOVED###################### $CodeBoxStr = ################REMOVED###################### if( ################REMOVED######################) { my ($resultcb, $error) = ################REMOVED########## +############ $Info1BoxStr = $resultcb; $Info2BoxStr = $error; } else { $Info1BoxStr = backslash(################REMOVED########## +############); $Info2BoxStr = ''; } Tkx::update('idletasks'); } ################REMOVED###################### $CodeBoxStr = $statuscode; $Info1BoxStr = $info1; $Info2BoxStr = $info2; $FilesizeBoxStr = length(################REMOVED################## +####); Tkx::update('idletasks'); ################REMOVED###################### } # END USER CODE # BEGIN CALLBACK CODE # ONLY EDIT CODE WITHIN THE SUB COMMANDS. # _button_1_command -- # # Callback to handle $_button_1 widget option -command # sub _button_1_command { print Dumper \@_; if($_button_1->cget('-text') eq "Start") { $_button_1->configure('-text', 'Stop'); $CodeBoxStr = ''; $Info1BoxStr = ''; $Info2BoxStr = ''; $FilesizeBoxStr = ''; Tkx::update('idletasks'); ################REMOVED###################### {'Tcl' => [\&InetCB, Tkx::i::inter +p() ]} ################REMOVED###################### } # _checkbutton_1_command -- # # Callback to handle $_checkbutton_1 widget option -command # sub _checkbutton_1_command {} # codeBox_invalidcommand -- # # Callback to handle $codeBox widget option -invalidcommand # sub codeBox_invalidcommand {} # codeBox_validatecommand -- # # Callback to handle $codeBox widget option -validatecommand # sub codeBox_validatecommand {} # codeBox_xscrollcommand -- # # Callback to handle $codeBox widget option -xscrollcommand # sub codeBox_xscrollcommand {} # filesizeBox_invalidcommand -- # # Callback to handle $filesizeBox widget option -invalidcommand # sub filesizeBox_invalidcommand {} # filesizeBox_validatecommand -- # # Callback to handle $filesizeBox widget option -validatecommand # sub filesizeBox_validatecommand {} # filesizeBox_xscrollcommand -- # # Callback to handle $filesizeBox widget option -xscrollcommand # sub filesizeBox_xscrollcommand {} # info1Box_invalidcommand -- # # Callback to handle $info1Box widget option -invalidcommand # sub info1Box_invalidcommand {} # info1Box_validatecommand -- # # Callback to handle $info1Box widget option -validatecommand # sub info1Box_validatecommand {} # info1Box_xscrollcommand -- # # Callback to handle $info1Box widget option -xscrollcommand # sub info1Box_xscrollcommand {} # info2Box_invalidcommand -- # # Callback to handle $info2Box widget option -invalidcommand # sub info2Box_invalidcommand {} # info2Box_validatecommand -- # # Callback to handle $info2Box widget option -validatecommand # sub info2Box_validatecommand {} # info2Box_xscrollcommand -- # # Callback to handle $info2Box widget option -xscrollcommand # sub info2Box_xscrollcommand {} # END CALLBACK CODE # Standalone Code Initialization - DO NOT EDIT # GUIBuildertkx::userinit() if defined &GUIBuildertkx::userinit; our($top) = Tkx::widget->new('.'); $top->g_wm_title('GUIBuildertkx'); GUIBuildertkx::ui($top); GUIBuildertkx::run() if defined &GUIBuildertkx::run; Tkx::MainLoop(); 1;