Re: What are parameterized accessible attributes?
Re: What are parameterized accessible attributes?
- Subject: Re: What are parameterized accessible attributes?
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 15 Dec 2004 17:31:38 -0500
on 2004-12-15 11:37 AM, David Niemeijer at email@hidden wrote:
> What is the kEventAccessibleGetAllParameterizedAttributeNames event
> all about? What are parameterized accessible attributes? when are
> they used and what for? I could not find any info on this aside from
> the info in the header which still left me puzzled.
They are for handling text flows, including text flows that span multiple
containers (i.e., multiple pages or multiple columns). They were documented
somewhere, probably in the Panther release notes. They were introduced in
Panther.
Given a text flow, you can pass in a character index or a line number, for
example, as the parameter, and depending on the function you can get back
the character range composing the Unicode glyph at that character index, the
character range for a "line" of text, and so on. Passing in a range of
characters, you can get back the text as plain text or as RTF data. And so
on. You have to match the type of the parameter to what a particular
parameterized function expects, of course.
To see parameterized attributes in action, fire up PreFab UI Browser and use
it on a TextEdit window that has some formatted text in it. In UI Browser,
set the target to TextEdit, then navigate to the 'text entry area' in the
scroll area in the front window. Then open the Attributes drawer and scroll
up and down. You'll see 7 or 8 parameterized attributes (named more or less
the same as the function name, especially if you set UI Browser's
preferences to view "Technical" as opposed to "Plain English" terminology).
To see the text represented by a character or a character range, select the
appropriate attribute, type in a character index or a line index or the
start and length of a range, and click the Set button. The value for that
parameter will appear in the Value column of the attributes table (such as a
portion of the text as a string or as RTF data, if that's the attribute you
selected). If you search UI Browser Help for "parameter" or "parameterized",
you will find an explanation of what is going on and how to use each of the
functions. I believe there is also some information in the UI Browser
Version History document (in the Help menu).
My framework documentation has even more information (way more than Apple
provides), but I haven't made it public yet.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden