Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: DynaTab Hide error

by merrymonk (Hermit)
on Oct 07, 2021 at 21:17 UTC ( [id://11137319]=note: print w/replies, xml ) Need Help??


in reply to Re: DynaTab Hide error
in thread DynaTab Hide error

Many thanks for you and others pointing me in the right direction. Will try again tomorrow.

Replies are listed 'Best First'.
Re^3: DynaTab Hide error
by merrymonk (Hermit) on Oct 08, 2021 at 13:43 UTC
    I now have tried to use the pagecget and pageconfigure Methods. However, for both I get the error
    Tk::Error: Failed to AUTOLOAD 'Tk::Frame::pageconfigure' at ... line nn in Perl script

    I notice two things:
    1. the pod's description of add (which I use to create the dyna tabbed frame) is
    Adds a page with name pageName (if provided) to the notebook. Returns an object of type Frame.
    2. the Error mentions Tk::Frame so I guess it is looking in Tk::Frame rather than Tk::DynaTabFrame which contains the sub pageconfigure

    I guess there are two questions (an answer to either may solve the problem):
    1. Is there an alternate to add to create the DynaTab frame which creates a DynaTabFrame object - I could not see one
    2. How can I get the application to use pagecget and pageconfigure from the DynaTabFrame module

    So an answer to either or even another solution would be much appreciated.

      You've been here for 17 years and made almost 450 posts. Why is it so difficult for you to understand that an error message without the source code is completely meaningless? How are we supposed to know what's at line "nn"? How are we supposed to know what "Perl script" refers to?

      Here's the guts of what you probably need:

      #!/usr/bin/env perl use strict; use warnings; use Tk; use Tk::DynaTabFrame; my $mw = MainWindow::->new(); my $dtf = $mw->DynaTabFrame()->pack(qw{-fill both -expand 1}); my $dtf_static = $dtf->add(Static => qw{-label Static}); my $dtf_transient = $dtf->add(Transient => qw{-label Transient}); $mw->Button(-text => 'Show', -command => sub { $dtf->pageconfigure(Transient => qw{-hidden 0}) })->pack; $mw->Button(-text => 'Hide', -command => sub { $dtf->pageconfigure(Transient => qw{-hidden 1}) })->pack; MainLoop;

      Although barebones, this works as is. This is the type of code that your SSCCE should contain. All of your error or warnings messages should be provided verbatim within <code>...</code> tags. Read, and fully understand, "How do I post a question effectively?" before posting again.

      — Ken

        Thank for you suggeston which does indeed give me sufficient to solve this isse.
        I will indeed follow your points about further posts. It has been a while since I have been at all active in asking Perl Monks questions whose answers in the past have been invaluable.
      I now have tried to use the pagecget and pageconfigure Methods. However, for both I get the error Tk::Error: Failed to AUTOLOAD 'Tk::Frame::pageconfigure' at ... line nn in Perl script

      Without your SSCCE I can only suggest that you look long and hard at line nn and the preceding statements.

      How can I get the application to use pagecget and pageconfigure from the DynaTabFrame module

      Perhaps the same way as the demo?


      🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found