Changeset 5845


Ignore:
Timestamp:
07/05/09 02:30:43 (3 years ago)
Author:
azawawi
Message:

[Perl 6] More robust searching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/Perl6HelpDialog.pm

    r5844 r5845  
    6565    my $self = shift; 
    6666 
     67    my $help_html; 
    6768    my $selection = $self->_list->GetSelection(); 
    68     my $help_target = $self->_list->GetClientData($selection); 
    69     my $help_html; 
    70     if($help_target) { 
    71         require App::Grok; 
    72         eval { 
    73             my $grok = App::Grok->new; 
    74             $help_html = $grok->render_target($help_target,'xhtml'); 
    75         }; 
     69    if($selection != -1) { 
     70        my $help_target = $self->_list->GetClientData($selection); 
     71 
     72        if($help_target) { 
     73            eval { 
     74                require App::Grok; 
     75                my $grok = App::Grok->new; 
     76                $help_html = $grok->render_target($help_target,'xhtml'); 
     77            }; 
     78        } 
    7679    } 
    7780     
     
    212215     
    213216    # Generate a sorted file-list based on filename 
    214     require App::Grok; 
    215     my $grok = App::Grok->new; 
    216     my @targets_index = sort $grok->target_index(); 
    217  
    218     $self->_targets_index( \@targets_index );  
     217    eval { 
     218        require App::Grok; 
     219        my $grok = App::Grok->new; 
     220        my @targets_index = sort $grok->target_index(); 
     221        $self->_targets_index( \@targets_index );  
     222    }; 
    219223     
    220224    return; 
     
    245249    if($pos > 0) { 
    246250        $self->_list->Select(0); 
    247         $self->display_help_in_viewer; 
    248     } 
     251    } 
     252    $self->display_help_in_viewer; 
    249253             
    250254    return; 
Note: See TracChangeset for help on using the changeset viewer.