Re: Some issues calling atk methods II
- From: Piñeiro <apinheiro igalia com>
- To: gnome-shell-list gnome org
- Subject: Re: Some issues calling atk methods II
- Date: Fri, 29 Oct 2010 14:28:43 +0200 (CEST)
From: Owen Taylor <otaylor redhat com>
> On Thu, 2010-10-28 at 20:37 +0200, Piñeiro wrote:
>> (Not sure if this is the proper list, but detected using gnome-shell,
>> sorry for the noise if this is the case).
>
> Well, there is no GJS-list, and it's a problem you are hitting working
> on gnome-shell so it's fine to discuss here.
Ok, thanks.
> (We don't do a lot of devel discussion on mailing lists - we tend to use
> IRC and bugzilla more, but for stuff that works well on a mailing list,
> this is the place.)
(Eduardo Lima here at Igalia advised me to ask Johan Dahlin on IRC, but
at that moment he was not on IRC, so I sent the mail).
>> But doing that I get this exception:
>>
>> ("Unhandled array element type 16")@gjs_throw:0
>>
>> I have checked Atk-1.0.gir, and it seems correct (I can paste the
>> method data if required).
>>
>> I'm doing something wrong? Suggestions?
>
> Nothing you are doing wrong - GJS just doesn't support arrays of objects
> (16 is the "INTERFACE" type which means "pointer to a
> boxed/structure/object". Your options at this point:
>
> * File a bug against GJS and wait
There are already a bug "Generalize array support" [2] As far as I see
this bug would solve this issue.
> * Add the capability to GJS yourself
> (gjs/gi/argc.:gjs_array_to_intarray() is the version for arrays of
> integers that you would need to extend and add something similar
> for arrays of objects)
That includes a patch, and Chris Lord created a branch to test it. I
tried to compile it but fails on compilation. I suppose that this is
because the changes on gobject introspection (patch was uploaded on
February)
> * Add a wrapper function to gnome-shell/src/shell-global.c that takes a
> GList of objects rather than an array of objects and use that from
> your code.
>
> (The function would just convert the list to an array and call the
> ATK function.)
> The last is certainly the fastest way to get to the end result. (If you
> do that, please also file the bug against GJS if there isn't already one
> there.)
Well, as I said on my original mail, in this specific case I can use
atk_object_add_relationship [1]. The purpose of my question was more
about what to do if I'm in the same situation in the future. I hope
that at that moment the bug would be solved.
Thanks for your answers
BR
[1] http://library.gnome.org/devel/atk/stable/AtkObject.html#atk-object-add-relationship
[2] https://bugzilla.gnome.org/show_bug.cgi?id=560567
===
API (apinheiro igalia com)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]