[Israel.pm] perl/tk warnings

Shlomi Bakish shlomi at il.marvell.com
Tue Apr 20 00:51:59 PDT 2004


Hi

This is a reduced version of my code, which gives the same warning. 
(Loosing Tk::Frame=HASH(0x40325df4))

Thanks
    Shlomi

#!/usr/local/bin/perl
use Tk;
use Tk::NoteBook;
local $mw = MainWindow->new;
$mw->geometry("150x150+20+50");

&buttons();
MainLoop;

sub buttons(){
$mw->Button(-text=>"try me !",
        -command =>sub{&add("stam");})
        ->pack();
return;
}

   
sub add_rem_selected(){
    my $elem = $_[0];
    &add_file($elem);
   
}
sub add(){
    my $file = shift;
    unless (Exists($files_nb)){
    $files_w  = $mw->Toplevel();
      $files_w->geometry("150x150+40+60");
    $files_nb = $files_w->Scrolled('NoteBook')
    ->pack(
    -fill=>'both',
    -expand=>'1');

    $files_nb->add($file,-label=>$file)
    ->pack();
    return;
    }
}

Offer Kaye wrote:

>>  Hi
>>
>>I am new here, I work with perl and perl/tk, I estimate my knowledge as
>>not so great as compared to most of you.
>>
>>    
>>
>
>Don't be so sure... :)
>
>  
>
>>I hope I can get some help with perl/tk (running in hp-ux, but also
>>solaris).
>>I have a gui application that let's you select files from a list, then
>>open a new window with a notebook widget, where
>>each file you selected gets a separate page, and some data from that
>>file is displayed in it.
>>During the opening of the notebook pages I get these message (even
>>without -w switch, one line per file:
>>Loosing Tk::Frame=HASH(0x40536918)
>>
>>    
>>
>
>Beats me... could be a bug in Tk::Frame? If no one else answers, try
>emailing a Perl/Tk specific mailing list or news group, or perhaps the
>author of the module.
>
>  
>
>>Now, on the opened window I placed an exit button, when I press it, the
>>application ends, but I get this :
>>page <last page name> does not exist at app.pl line 303
>>
>>    
>>
>
>You're trying to access something which doesn't exist. Bad boy! ;-)
>Perhaps it is some sort of out-of-bounds error (since you say you get the
>last page name in the message)? Check your variables and make sure you
>aren't trying to access something which doesn't exist. I'm sorry, but
>without seeing the code I can't be any more specific.
>
>  
>
>>any ideas ?
>>If you need, I can quote some of the code, just tell me what you need to
>>see.
>>
>>Thanks
>>  Shlomi
>>
>>    
>>
>
>--
>Offer Kaye
>_______________________________________________
>Perl mailing list
>Perl at perl.org.il
>http://www.perl.org.il/mailman/listinfo/perl
>
>
>  
>





More information about the Perl mailing list