[jawsscripts] Re: Resizing arrays

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 5 Jan 2012 11:21:13 -0500

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
__________�

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

Other related posts: