Re: [Vala] Genie: Gtk.Entry in Gtk.Dialog
- From: "webierta gmail com" <webierta gmail com>
- To: Al Thomas <astavale yahoo co uk>, "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] Genie: Gtk.Entry in Gtk.Dialog
- Date: Wed, 8 Feb 2017 21:55:39 +0100
Thank you very much! Your help has helped me solve it and now I can
continue.
I am writing the code with Genie (+ Sqlite + Gtk) to make a basic
contact agenda, just with the intention of practicing to learn.
The project is progressing well, but sometimes I block things like this,
and thanks to people like you I can continue learning.
When the project is more advanced I will share it here to know your
suggestions for improvement.
Thank you.
El 08/02/17 a las 20:31, Al Thomas escribió:
----- Original Message -----
From: "webierta gmail com" <webierta gmail com>
Sent: Wednesday, 8 February 2017, 17:48
Subject: [Vala] Genie: Gtk.Entry in Gtk.Dialog
I'm going crazy trying to get the text from a Gtk: Entry in a Gtk.Dialog.
class Dialogo: Gtk.Dialog
entrada_nombre: Gtk.Entry
def crea_dialogo ()
entrada_nombre: Gtk.Entry = new Gtk.Entry()
I think that last line should just be:
entrada_nombre = new Gtk.Entry()
You have already declared the variable in the scope of the
class itself. By declaring another variable of the same name
in the crea_dialogo method you have a new variable, but in
the scope of only the method. Whether you use:
var entrada_nombre = new Gtk.Entry()
or
entrada_nombre:Gtk.Entry = new Gtk.Entry()
both are declaring a new variable because you are specifying
the type, either explicitly or by inference.
Al
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]