miaiteo has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear monks,

I am following a Tk tutorial, and I need to adapt the Tk commands to the Tkx package. At this point, I am learning how to use a frame widget, and I am using this syntax (copied only the part of the script that gives the error):

"my $mw = Tkx::widget->new(".");#main window my $frm_name = $mw -> new_frame() -> g_pack(); #New Frame my $lab = $frm_name -> new_label(-text => "Name:", -font => Arial) -> +g_pack(); my $ent = $frm_name -> new_entry() -> g_pack();"

The error that I get when running the script is: "Can't call method new_frame without a package or object reference..."

Did someone encountered such an issue, or has an idea about what I'm doing wrong?

Thanks,

Mihai

Replies are listed 'Best First'.
Re: using Tkx Package
by Anonymous Monk on Nov 04, 2012 at 15:22 UTC

    I am following a Tk tutorial, and I need to adapt the Tk commands to the Tkx package.

    don't, its a waste of time

    Or, if you want to learn Tkx , read Tkx/Tkx::Tutorial, http://www.tkdocs.com/