Re: [Vala] Run signal once
- From: Luca Bruno <lethalman88 gmail com>
- To: Ivo Kosir <ivokosir yahoo com>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] Run signal once
- Date: Mon, 12 Nov 2012 09:55:41 +0100
It's good, not a workaround.
On Mon, Nov 12, 2012 at 3:02 AM, Ivo Kosir <ivokosir yahoo com> wrote:
Hi,
While programming with signals it happened many times that I wanted to
connect signal, but run it only once.
So, I was doing it like this:
ulong id = 0;
id = object.signal.connect(() => {
do_something();
object.disconnect(id);
});
This looks a bit complicated, and more like a workaround, not a real
solution.
Is this a good solution, or I'm missing something?
Thanks!
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
--
www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]