Cannot set "string array" properties
I'm trying to set Gtk.AboutDialog:authors
property.
In XML, I simply write it like this
<property name="authors">Mazhar Hussain <mmazharhussainkgb1145@gmail.com></property>
In blueprint, I tried writing it like this
authors: "Mazhar Hussain <mmazharhussainkgb1145@gmail.com>";
It didn't work.
I got this error message
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 57, in main
opts.func(opts)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 81, in cmd_compile
xml = self._compile(data)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 134, in _compile
if len(ast.errors):
File "/usr/lib/python3.10/site-packages/blueprintcompiler/utils.py", line 41, in real_func
self.__dict__[key] = func(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 76, in errors
return list(self._get_errors())
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
[Previous line repeated 1 more time]
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 81, in _get_errors
validator(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 142, in inner
func(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/language/values.py", line 69, in validate_for_type
type = self.parent.value_type
File "/usr/lib/python3.10/site-packages/blueprintcompiler/language/gobject_property.py", line 66, in value_type
return self.gir_property.type
File "/usr/lib/python3.10/site-packages/blueprintcompiler/gir.py", line 176, in type
return self.get_containing(Namespace).lookup_type(self.type_name)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/gir.py", line 172, in type_name
return self.xml.get_elements('type')[0]['name']
IndexError: list index out of range
Arguments: ['/usr/bin/blueprint-compiler', 'compile', 'about-dialog.blp']
***** COMPILER BUG *****
The blueprint-compiler program has crashed. Please report the above stacktrace,
along with the input file(s) if possible, on GitLab:
https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/new?issue
So, I tried writing like this
authors: StringList {
strings [
"Mazhar Hussain <mmazharhussainkgb1145@gmail.com>"
]
};
That didn't work either.
This time, I got this error message (pretty much the same)
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 57, in main
opts.func(opts)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 81, in cmd_compile
xml = self._compile(data)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/main.py", line 134, in _compile
if len(ast.errors):
File "/usr/lib/python3.10/site-packages/blueprintcompiler/utils.py", line 41, in real_func
self.__dict__[key] = func(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 76, in errors
return list(self._get_errors())
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 86, in _get_errors
yield from child._get_errors()
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 81, in _get_errors
validator(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/ast_utils.py", line 142, in inner
func(self)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/language/gobject_property.py", line 94, in obj_property_type
type = self.value_type
File "/usr/lib/python3.10/site-packages/blueprintcompiler/language/gobject_property.py", line 66, in value_type
return self.gir_property.type
File "/usr/lib/python3.10/site-packages/blueprintcompiler/gir.py", line 176, in type
return self.get_containing(Namespace).lookup_type(self.type_name)
File "/usr/lib/python3.10/site-packages/blueprintcompiler/gir.py", line 172, in type_name
return self.xml.get_elements('type')[0]['name']
IndexError: list index out of range
Arguments: ['/usr/bin/blueprint-compiler', 'compile', 'about-dialog-2.blp']
***** COMPILER BUG *****
The blueprint-compiler program has crashed. Please report the above stacktrace,
along with the input file(s) if possible, on GitLab:
https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/new?issue
Is there any way I can set such properties in blueprint that I don't know of?
Input Files
Edited by Mazhar Hussain