Why are you using Tkx? Did you know that Tk is available via ppm?

wakawaka  [ddg://site:perlmonks.org Tkx without a package or object reference] site:perlmonks.org Tkx without a package or object reference ...-> Re^3: Tk vs Tkx for -validatecommand, Re^5: Tk vs Tkx for -validatecommand

->g_pack() doesn't return an object

#!/usr/bin/perl -- use strict; use warnings; BEGIN{ $Tkx::TRACE=64; } use Tkx; Tkx: package require Tk my $main = Tkx::widget->new("."); my $message_box_toplevel = $main->new___toplevel(); # message box has two frames (top and bottom) my $f_message_top = $message_box_toplevel->new_frame()->g_pack( + -side => 'top', + -expand => 1, -f +ill => 'both', ); my $message_box = $f_message_top->new_tk__text( -wrap => 'none', -widt +h => 50, -height => 20 ); Tkx::MainLoop(); __END__ Tkx-1-0.0s---9: winfo children . Tkx-2-0.0s---9: ::toplevel .t Tkx-3-0.0s---11: winfo children .t Tkx-4-0.0s---11: frame .t.f Tkx-5-0.0s---11: pack .t.f -side top -expand 1 -fill both Can't call method "new_tk__text" without a package or object reference + at - line 18.

*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,


In reply to Re: cant call method new_tk__text (why tkx)( Tkx without a package or object reference g_pack returns nothing) by Anonymous Monk
in thread cant call method new_tk__text by oip

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.