Re: [Vala] I'm not a Genie !
- From: Alberto Colombo <a colombo kingston ac uk>
- To: vala-list gnome org
- Subject: Re: [Vala] I'm not a Genie !
- Date: Thu, 14 May 2009 09:56:58 +0100
Have a look at the example here [1]
Basically, it's
spin_box.value_changed += def (s)
slider.set_value(s.get_value())
regards
alb
[1]
http://live.gnome.org/Genie#head-93c30a90dd598bc4842375507de86f82cf8c6930
On Wed, 2009-05-13 at 19:45 +0200, Nicolas wrote:
Hi,
I'm trying to make a very simple program from vala to genie.
But i have a problem, how to convert:
spin_box.value_changed += (s) => {
slider.set_value (s.get_value ());
};
to genie syntax ?
This is the code for the program:
[indent=4]
uses
Gtk
init
Gtk.init (ref args)
var test = new TestWindow ()
test.show_all ()
Gtk.main ();
class TestWindow : Window
init
title = "Test Window"
default_height = 20
default_width = 300
window_position = WindowPosition.CENTER
destroy += Gtk.main_quit
var spin_box = new SpinButton.with_range (0, 130, 1)
spin_box.value = 35
var slider = new HScale.with_range (0, 130, 1)
var hbox = new HBox (true, 5)
var button = new Button.with_label("Exit")
button.clicked += Gtk.main_quit
hbox.add (spin_box)
hbox.add (slider)
hbox.add (button)
add (hbox)
Thanks in advance,
Nikobordx.
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
This email has been scanned for all viruses by the MessageLabs Email
Security System.
--
Alberto Colombo, MSc
PhD student at Digital Imaging Research Centre
Kingston University, London
e-mail: a colombo kingston ac uk
phone: +44 (0)20 8547 8642
http://cism.kingston.ac.uk/people/details.php?AuthorID=925
This email has been scanned for all viruses by the MessageLabs Email
Security System.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]