Re: Writing a Module for SourceView with GOI



On 06.05.2016 14:46, max augsburg gmx de wrote:
I solved the problem with /"my $lm =
Gtk3::SourceView::LanguageManager->get_default();" /following by adding
the following lines to the SourceView Module:
/my @_CLASS_STATIC_METHODS = qw/
    Gtk3::SourceView::LanguageManager::get_default
/;/
/[...]/
/sub import {/
/[...]/
/class_static_methods =>\ _CLASS_STATIC_METHODS,/
/}/
For me /"my $lm = Gtk3::SourceView::LanguageManager->get_default();"
 /feels more perlish than /"my $lm =
Gtk3::SourceView::LanguageManager::get_default();" /:-)
 
*off-topic:* I saw the same problem with
"Gtk3::Gdk::keyval_name($keyval);". Perhaps one of the Developer of the
Gtk3.pm module could also fix this (if it is a fix :-) )?

I've decided very early on to keep these kinds of deviations from the
introspection API to a minimum.  To Gtk3 I basically added only those
that ease porting from Gtk2.

In your module, it's your decision whether to include this, of course.
But consider that documentation generators like "perli11ndoc" don't know
of your overrides and hence will display a different API for the GIR
file you're wrapping.


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