Re: [Vala] Detailed Signals



On this subject, is it possible to use a detailed name that is not a string
literal? I would like to pass a function an object and a property to set the
handler on, like this:

obj.notify[prop].connect(notify);

When compiling (with 0.9.1):

** (valac:5928): CRITICAL **: vala_string_literal_eval: assertion `self !=
NULL' failed

** (valac:5928): CRITICAL **: vala_code_node_get_source_reference: assertion
`self != NULL' failed
error: internal error: only literal string details supported

Seems pretty clear that what I want to do is not supported by valac. Is
there a workaround for this, or should I write that function in C and make a
vapi for it?

-Nate

On Tue, Jun 8, 2010 at 1:12 AM, Luca Bruno <lethalman88 gmail com> wrote:

On Mon, Jun 07, 2010 at 09:55:36PM -0400, Michael Terry wrote:
I notice that the release notes for 0.3.4 said support was added for
detailed signals [1].  What's the syntax for it?  Super-obvious
attempts at using them didn't work.

[1] You know, a signal like "changed::foobar"

obj.changed['foobar'].connect (...);

--
http://www.debian.org - The Universal Operating System

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJMDdEnAAoJEETrFmfSwntr9HkQAPaLYnMcObGyRs4KEIyzXQd/
B36Dzi4PjoMGg7ae2Ha1xphmr5V/39uZQw6lubD0rsZwJpJuVkjBi4MB0Tt5f31s
8YaPJAsfvIC1cNHgJIR+DwoRndlt0iEW+nI5UsWPv0IP7jJzTSyyxgZVojGc1Hl4
GsYKAzGXKHCoVzqpo834k7MCyrrilDR2naURWbmwT1gIQK6pkahXe04txceT37sh
PW9HSgQAfi/ItAVGF/ca6GQ1fOtabD5bmpmCUJW5JKrsUuXztohFEd9KlvdHDchV
0JPCRkyGDm2qKG7R7AwdICKv6iflZPKGlwJEcjrYZAsHgLSvGo/PPmiRjUCm4Bx0
t+HkO1zBNRJ92xbSagi+HDgHYkhKoqy2I2AJibOfT95SVX+YNxENscMFR1p2z+Qs
tC1+YU4ZKWlmXYuGwwgoF/atgA5YIIniCKBz30GArNiEjxmThpwFi6kldXtkdl6V
tvbIWuxikZTUCzjZXuOFRCZ9vGt6DGMrCY9oxDeUCiOOPwhsg/ARtvIf50HAk3ck
ANLs0R91Bble5G/2flUsgCzjJGWHjHpD4Tv8QmqxdJhXVQfe9cM+qJ1Zd2aZg6As
gZdYB1baqBGnV3TJyFVEV8U/wmELx34J9eih8NVfuPOEPigW1JctbUXi0S9wktyA
JyiX3oE0Xc+AyIJWwtD/
=ds3s
-----END PGP SIGNATURE-----

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]