On Tue, Jun 08, 2010 at 04:23:31AM -0400, Nate Stedman wrote:
> 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?

obj.notify[prop] is a static syntax despite [...] are generally used with
expressions. I don't think if it will be supported anytime soon.
You might want to report a bug against it.

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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to