gettingstarted
[Top] [All Lists]

listindex changes for no reason

To: gettingstarted at lists dot realsoftware dot com
Subject: listindex changes for no reason
From: Greg Moore <gamoore at aol dot com>
Date: Thu, 30 Oct 2003 03:26:58 -0800
I am encountering some unexplained behaviour. I am making a selection in a listbox then using those values to set a menu. It has worked fine in the past. Now I am getting an error - where the listindex for the listbox is correct for the first few lines, then suddenly it changes to -1.
//------------------------------------------ in CHANGE handler of Listbox
  if me.Listindex >=0 then //listIndex is the current selection
    'ebClNum.Text       = ebClDept.text + " " + me.cell(me.listindex,2)
    ebClass(0).Text      = me.cell(me.listindex,2)
    ebClass(1).text      = me.cell(me.listindex,3)
    ebClass(7).text      = me.cell(me.listindex,4)
    ebClass(2).text      = me.cell(me.listindex,5)
   //-----listbox.listindex changes from 3 to -1 or 5 to -1 right here!!!!!!!
    searchtext = me.cell(me.listindex,6)

end if
//------------------------------------------
I made some edits other areas of the program but not to this. It was working fine before! What can cause the selection to change on a listbox? I tried to comment out that code above, and when I make a selection, it loads other information, but then the selection turns off really fast on its own.

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>