RE: Are multiple mainwindows possible?

[email protected] ("Konovalov, Vadim (Vadim)** CTR **")
Newsgroups perl.tcltk
Message-ID <35BF8D9716175C43BB9D67CA60CC345E11A64937@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com>
> From: Michael Carman [mailto:[email protected]] 
> Tkx doesn't expose the interpreter directly but you can use it via
> Tkx::eval(). It's definitely a powerful feature -- 
> Tkx::ROText wouldn't
> be possible without it.

thanks for letting know.

I do not see "eval" in "perldoc Tkx" - is it also going to be away?

Actually the possibility to have tcl/tk evals this allows to separate GUI creation logic from program, which makes me feel better :)
Add to this, that tcl/tk creation of widgets is less verbose than Perl's way.

> 
> Per the previous thread on callback syntax, you could get at the
> interpreter this way

interesting way :)

Best regards,
Vadim.

> 
>   #!/usr/bin/perl
>   use strict;
>   use warnings;
>   use Tkx;
> 
>   my $interp;
>   my $mw = Tkx::widget->new('.');
>   my $button = $mw->new_button(
>     -command => sub { $interp = $_[1] }, # Bwahaha
>   );
>   $button->invoke();
>   $button->g_destroy();
> 
>   print $interp;
> 
>   __END__
>   Tcl=SCALAR(0x35b2efc)
> 
> But that's undocumented and looks like it's going away (which 
> is good).
> 
> -mjc
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.