Re: dogtail text attributes



Oh, I misunderstood you before. You're right, dogtail does not currently have its own API for the finer-grained AccessibleText attributes. *But* for situations like this, there is always a workaround. You may access the "real" AccessibleText object by doing something like this:

(n is a Node instance that implements the AccessibleText interface)
>>> nText = n.queryText()
>>> print str(nText)
"<CORBA.Object 'IDL:Accessibility/Text:1.0' at 0x7fcf54570c90>"

And you can use any of the normal AccessibleText attributes/methods as documented in the AT-SPI docs.

That said, the above is a workaround. It won't go away, but I am certainly not opposed to adding more convenience attributes/methods to the Node class itself. Patches always accepted :)

Zack


Allen Taylor wrote:
Well, actually, I'm looking for the attributes of the text, i.e., fg-color, bg-color, etc. as displayed in Accerciser. I believe Node.text just gives me the text content itself (i.e., it is not an object). Is this not the case?
Allen

 >>> Zack Cerza <zcerza redhat com> 2009-02-10 16:51 >>>
Allen Taylor wrote:
 > Does anyone know if dogtial makes the text attributes available (i.e.,
 > the one in the AccessibleText interface)?
 > Allen Taylor

It does: you want the Node.text attribute.

Zack
_______________________________________________
dogtail-list mailing list
dogtail-list gnome org
http://mail.gnome.org/mailman/listinfo/dogtail-list



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