Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Tk::NoteBook tabs in a Tk::Dialog question

by graff (Chancellor)
on Apr 24, 2002 at 04:02 UTC ( #161512=note: print w/replies, xml ) Need Help??

in reply to Tk::NoteBook tabs in a Tk::Dialog question

Um, so... which line is line #34 in your code?

(Since the <code> tag does not, by itself, number the lines, it will be helpful in your posting if you add a comment at the line that is referred to in a quoted error trace, to make that clear.)

Let me guess that it might be this line:

my $e1 = $p->add( 'Entry',
I'm guessing it's this one, because the error says you're trying to call an "add" method on a "Frame" widget, which has no such method; and while I have never used a NoteBook widget before, I wouldn't be surprised to look in its docs and discover that the widget you get back when you call the "add" method on a NoteBook is ... a Frame, which would make your "$p" a frame widget and raise the error. You should look that up.

As for buckaduck's reply, it is of course fine (and frequent practice) to both invoke and pack a widget at "the same time", as you do in your original code. Don't worry about that.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-05-17 08:21 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (65 votes). Check out past polls.