Re: [Vala] Vala to Genie
- From: Nicolas <c r n a wanadoo fr>
- To: self antono info, vala-list gnome org
- Subject: Re: [Vala] Vala to Genie
- Date: Mon, 21 Feb 2011 17:32:33 +0100
What happens if you declare the function as static ?
def static register_plugin()
For the second error, what happens if you declare the class like this:
class Connect : Object, Match
Nicolas.
Yeah! It works. Probably need to move this to Genie wiki.
But I fall into another issues so need some more help :)
def register_plugin()
DataSink.PluginRegistry.get_default().register_plugin(
typeof (GeniePlugin),
"Genie Example", // Plugin title
_ ("Synapse plugin example wiritten in Genie language"),
"terminal", // icon name
register_plugin, // reference to this function
...
);
valac complains:
genie-test-plugin.gs:25.206-25.220: error: Cannot create delegate
without target for instance method or closure
register_plugin, // reference to this function
Also need to translate following:
private class Connect : Object, Match {
// from Match interface
public string title { get; construct set; }
public string description { get; set; }
public string icon_name { get; construct set; }
public bool has_thumbnail { get; construct set; }
public string thumbnail_path { get; construct set; }
public int default_relevancy { get; set; default = 0; }
public MatchType match_type { get; construct set; }
I made something like this:
class Connect : Object implements Match
prop title : string
prop description : string
prop icon_name : string
prop has_thumbnail : bool
prop thumbnail_path : bool
prop match_type : MatchType
Valac complains here:
genie-test-plugin.gs:44.7-44.25: error: Type and/or accessors of
overriding property `Synapse.GeniePlugin.GenieItem.title' do not match
overridden property `Synapse.Match.title'.
prop title : string
^^^^^^^^^^^^^^^^^^^
genie-test-plugin.gs:46.7-46.29: error: Type and/or accessors of
overriding property `Synapse.GeniePlugin.GenieItem.icon_name' do not
match overridden property `Synapse.Match.icon_name'.
prop icon_name : string
^^^^^^^^^^^^^^^^^^^^^^^
etc.
I'am begginer in Vala and Genie so dont
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]