[jawsscripts] Re: Resizing arrays

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 5 Jan 2012 12:25:34 -0500

JAWS 12 introduced a CollectionRemoveItem function for that.

On Thu, Jan 05, 2012 at 11:23:32AM -0600, Travis Roth wrote:
Kind of messy but I see your reasoning.
How do you remove an item from a collection?


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee
Sent: Thursday, January 05, 2012 10:21 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Resizing arrays

In the absence of knowledge of a way to do that, I've been using collections
as dynamic arrays, where the keys are things like intToString(i).  You do
need to stringify the keys though. When I do that, I also sometimes include
a count key that I keep updated when adding or removing elements. This also
allows for efficient sparse arrays but does complicate their management a
bit and precludes things like inserts/deletes where elements slide in to
fill the hole or make room.

On Thu, Jan 05, 2012 at 10:17:13AM -0600, Travis Roth wrote:
Is it possible to resize arrays in JAWS script?
It appears that the arrays are dynamically sized at runtime because the new
keyword is used.
But the documentation on the website does not seem to discuss destroying or
resizing arrays?
This may not be an issue for local variables, but I am thinking for a global
array where at some point it may be desireable to store something larger
than was originally set for.



__________???

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

--
Doug Lee, Senior Accessibility Programmer SSB BART Group -
Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx
http://www.ssbbartgroup.com "While they were saying among themselves it
cannot be done, it was done." --Helen Keller __________o?=

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


__________???

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

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

Other related posts: