Re: [Vala] [Genie] Using MarkupParser
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Patrick Castle <lemeia bigpond com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [Genie] Using MarkupParser
- Date: Mon, 26 Oct 2009 12:58:10 +0100
Hi,
2009/10/25 Patrick Castle <lemeia bigpond com>:
I've been trying to learn Genie and it's going OK for the moment. However, I was
trying to translate a Vala example using MarkupParser in GLib and I was coming
unstuck on how to define multiple anonymous functions in a comma-separated
parameter list.
[...]
I attempted with:
parser : MarkupParser = { def (ctx, elem, attribute_names, attribute_values)
print("start |%s|\n", elem)
for i : int = 0 to attribute_names.length
print("Attribute name: %s, value: %s\n", attribute_names[i],
attribute_values[i]), \
def (ctx, elem)
print("end |%s|\n", elem), \
def (ctx, text, text_len)
print("text %ld |%s|\n", (long)text_len, text), \
null, null }
I think it should be that way, but this doesn't work, I think this is a bug.
I've already came across this (I'm trying to port a python library to
genie), and passing even a single parameter won't work, I think Genie
needs a test suite (a good start is to translate some of the examples
on the wiki, I'll try to do some tonight).
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]