On Mon, 2011-02-21 at 11:42 -0500, Jamie McCracken wrote:
> > 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
> > ^^^^^^^^^^^^^^^^^^^^^^^
> your properties need to match the interface correctly
>
> use readonly when there is only a get and no set and likewise use
> construct for constructor properties
>
>
> try
>
> prop construct title
> prop readonly description
> etc...
>
> jamie
>
No success:
genie-test-plugin.gs:41.12-41.20: error: syntax error, expected
identifier
prop construct title : string
^^^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)
--
xmpp:[email protected]
gopher://antono.info/
http://antono.info/
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list