Re: [orca-list] Structural HTML navigation by lists



Am 23.01.2011 02:27, schrieb Joanmarie Diggs:
Hey Marcus.

The new pop-up menu is using the criteria/predicate (for searching) and
present (for presenting) properties of the corresponding
StructuralNavigationObject instance.

Awesome. It sounds like you are (already were) heading in the same
direction I was envisioning. Nice!

joanie, I have a question about criteria/predicate.

Is it acceptable if I'm using predicate only? Since not all applications
providing collections I could use pyatspi.findAllDescendants(document,
predicate) to get matches. This would save code, too.

I can't prove it, but I have a feeling that it also works a little faster.

This safes many lines of code. The current changes will result into a
patch with ~ 850 lines. My last patch on the other hand has more than
1500 lines.

Also nice.

Since I'm using the guessTheLabel method there are many more lines
saved. :-)

This could be done if you add two lines like above to the corresponding
method (_spellingErrorsBindings or so). As I said the search and
presentation is done by the *Criteria/*Predicate and *Presentation
methods.

Two lines ain't bad. :-)

Yes, excepting for those, where you have to create extra methods. As
example for the heading levels. But I think mostly this will not be
necessary.

joanie, I have tested the guessTheLabel method some days ago to save
more code. But this method has returned mostly empty labels. And
currently it seems to me that this method is only executed on form
fields. Could this be true?

Not just could; definitely is. What label guessing* does is just that:
guess** the label for unlabeled form fields. Ignoring Orca for a
moment... A label is not the same as a name; it's a separate object
(GtkLabel, <label>foo</label>, etc.) that... labels... another object.
And that typically only occurs in form fields (and dialog boxes):
specifically in widgets which expect data to be provided or altered.

Getting back to Orca.... If a widget is properly labelled, then then
that widget should obtain its (accessible) name via the label
automagically. Thus there is no reason for us to guess a label because
we have a name we can trust. If the thing isn't a widget, but is instead
some sort of text object, then it doesn't make sense to guess as we're
interested in the displayed text.

Sure, I was confused. :-) Since all informations from an object will be
part of a label in my lists, for me was it all a label. One hour after
sending this question I've readed the comments and understood.

Greetings
Marcus



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