[jawsscripts] Re: DLGSelectItemInList, usage of new extra buttons in jaws11?

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 23 Jun 2010 07:56:06 -0400

Hi Geoff,
You're a musician, so here's an example for you. In music, the major scale 
starts on 1. You start counting at note number 1. That is 1 based. In some JAWS 
functions, you get a group of things back. The count of things starts at 1. 
That's what they mean by one based.

By contrast, in a lot of programming languages, arrays start at 0. You start 
counting with 0. That is zero based. In other words the base or first item in 
the index is zero.

Thanks.

Jim
Jim Homme,
Usability Services,
Phone: 412-544-1810. Skype: jim.homme
Internal recipients,  Read my accessibility blog. Discuss accessibility here. 
Accessibility Wiki: Breaking news and accessibility advice


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Geoff Chapman
Sent: Wednesday, June 23, 2010 1:41 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] DLGSelectItemInList, usage of new extra buttons in 
jaws11?

Hi mighty scripters.

 just had Couple questions today re down and dirty coding
usage of the new custom buttons option found in the DLGSelectItemInList
function, that they've introduced in jaws11.

firstly, just a basic little question, what exactly do people mean when they
talk about, 1-based?  like in the description of parameter 6 of this
function in jaws11, where they write:
:

"6. Int: The 1-based button index of the custom button invoked,

0 for cancel, -1 for OK."



I'm only just trying to get to grips with this function generally, so
forgive the newby questions on this, but, it sounds like to me from the
below fsdn description, that in jaws11 they've allowed you to have up to 5
extra buttons in this dialog, apart from the ok and cancel buttons.

And, well I'm just trying to puzzle out how exactly one might utilize these
buttons, to feed back into one's code in the realWorld, which button the
user chose?

 Like I think I understand so far, that normally, this dlgSelectItemInList
function returns an integer representing the numbered option the user chose
from the vertical bar delimited list.

Then, if one wanted to use that to provide as an index to stringSegment
afterwards, one can get the precise string of the option chosen.

But, whith this new option of extra buttons, how does one exactly glean
which one the user pressed, from the new return structure of this function?



Also, in the above param6 description, is all that they mean by that, is you
can set which button should be the defaulted button attached to enter, out
of the new potentially 7 button dialog? e.g. that if you were to fill this
in with value 0, that ok would be the default button, but if you made it,
say, a value of 4, then by default, enter would activate the 4th custom
button in your group of 5?

is that all this means?

i.e. it's nothing to do with what the function actually returns, if the user
tabbed to some other button and hit spaceBar on that?



for the latter, of course, is the meat and potatoes of how one goes about
optimally utilizing this eh.



I'll paste in a summarized entire reference out of the fsdn to save people
looking it up, in case this helps, but, I'm just a bit puzzled as to how i'd
actually incorporate the user selecting a certain button out of such a
dialog? There's also the little caveat of,

"Returns data by reference," at the bottom of the function description.

which also at present was a little beyond my current
experience/understanding?



thanks for any additional tips anyone would care to offer upon this one?



here's the entire summary version of the function as it now exists in
jaws11.



DLGSelectItemInList.

Displays a dialog that contains a set of menu items. When the dialog is
okayed, the one based index of the selected item is returned.


returns: int. This is 0 if the dialog was cancelled, otherwise the one based
index of the selected item.


params

1. string: A "/007" delimited set of menu items.

2. string: A string containing the name you want to appear as the title for
the Menu Select dialog.

3. int: If TRUE, then the contents of the list will be sorted.

4. int: the index of the item which should have the focus when the dialog is
invoked. (JAWS 5.0 and above.)

optional.

Then in jaws11 and above:

5. String: a list of up to 5 button names delimited with the vertical bar
character "ButtonCaption1|ButtonCaption2l|...ButtonCaption5."

Optional.

6. Int: The 1-based button index of the custom button invoked, 0 for
cancel, -1 for OK.

optional.

* Returns data by reference.


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.
__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: