Re: [g-a-devel] children-changed signals in at-spi2



Hi Li,

> Ginn found a bug today that when Firefox created a new window, the
> window can not be seen in Accerciser. We think the problem might be that
> the "index" field of "children-changed:add" signal is missing. Actually
> it is not missing, it is 0.

If the index is 0 and that isn't actually the child that has been added
then it will cause problems. The index is used to add new children to
the cache even if it isn't sent in the UpdateAccessible signal.

> 
> So I checked the code and find atk-bridge does not emit
> "children-changed" signals anymore. Instead it emits "UpdateAccessible".
> And on pyatspi2 side, the old cache and the new cache are compared to
> determine if this is an add or a remove and send "children-change:add"
> or "children-change:remove" to ATs. (Please correct me if I am wrong.)
> 
> This comes up with two questions:
> 
> 1. In at-spi2-core/xml/org.freedesktop.atspi.Accessible.xml,
> "object:children-changed" is one of the signals of accessible. Now
> atk-bridge doesn't emit it anymore. This can be a problem if we develop
> another language bindings used by ATs.

There are a number of inconsistencies in the XML description of the
protocol. At the moment it doesn't properly match what is going on in
the code. At some point we will need to do a thorough analysis of it.

> 
> 2. The index information is not passed to ATs. So there may be bugs if
> ATs rely on the index number (or the AtkObject which is the second
> arguments of children-changed signal). 

I'm not sure what you mean by the index information not being passed to
the AT's. An array of objects is passed to the AT's the index
information is implicit in the array structure. Its an ordered list.

> 
> So is it possible to emit "children-changed" signal in atk-bridge and
> use a separate listener in pyatspi2 to listen it? 

I've been thinking about doing this. It would make the code in Pyatspi
simpler, and so might help out if anyone wants to write new bindings. 

Thanks

Mark





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