Fwd: Re: Writing a class from type Gtk3::SourceView::CompletionProvider



Sorry, I forgot that you'll need to call the constructor of the class you're blessing. Here's how it should be:

sub new {
    return bless Gtk3::SourceView::CompletionProvider->new();
}

Here's an example of some code from my gtk2-perl project, SeekMIDI at https://github.com/oldtechaa/seekmidi/:

use Gtk2;
use base 'Gtk2::VBox';

sub new {
    my $topVBox = bless Gtk2::VBox->new();
    return($topVBox);
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]