BL> Does anyone know of a way to get PowerBuilder to reduce the
>size of the array by 1?
There's certainly no built-in function for your problem. The only
array functions I know of are LowerBound() and UpperBound().
Certainly, your problem could be solved easily by creating a table in
the db instead, but I suppose you want quick access to your data.
The next best thing to using arrays is to create a non-visual user
object which consists of a listbox. This way, you can use all the
powerfull functions of a listbox:
.. just to mention a few.
You can then call these functions by referencing the user object and
uo_array.lb_listbox.AddItem ( emp_name )
emp_name = "Kurt"
get_row = uo_array.lb_listbox.FindItem ( emp_name )
uo_array.lb_listbox.DeleteItem ( get_row )
To reference the variables put in the listbox, use:
my_sle.Text = uo_array.lb_listbox.Text ( get_row )
Notice that the above line uses the *function* Text(), which is used to
get items from a listbox after the AddItem() or InsertItem()
functions have been used. Many people try to use the *attribute*
Text[x] to get items from a populated listbox. This won't work.
This will be a little slower than using arrays, but you won't see a big
difference. ps: don't forget to create an instance of the object
before you manipulate it, preferably in the open event of the app.
Hope it helps....
--- a *cowboy serf