Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'
- From: Jonathan Moerman <jonathanmoerman gmail com>
- To: Sascha Manns <Sascha Manns mailbox org>
- Cc: Vala-list <vala-list gnome org>
- Subject: Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'
- Date: Mon, 10 Apr 2017 16:27:04 +0200
get_active_text looks like a method to me, did you try doctype =
cboDocType.get_active_text(); ?
Op 10 apr. 2017 4:22 p.m. schreef "Sascha Manns" <Sascha Manns mailbox org>:
Hello list,
i created a class what contains:
// Properties
public string doctype { get; set; }
// GUI Elements
[GtkChild] private Gtk.ComboBoxText cboDocType;
// on_cboDocType_changed gets the chosen document type
[GtkCallback]
private void on_cboDocType_changed () {
doctype = cboDocType.get_active_text;
}
The compiler says:
ui/create_publication.vala:45.2-45.37: error: Assignment: Cannot convert
from `Gtk.ComboBoxText.get_active_text' to `string'
doctype = cboDocType.get_active_text;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But as far as i know the combobox text is a string. So it should work.
What can i do?
Greetings
Sascha
--
Sascha Manns
Maifeldstraße 10
56727 Mayen
P: +49-2651-4014045
W: http://saigkill.tuxfamily.org
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]