Hi Kirk,

> I'm not able to replicate all of the issues you mention with a collection
> based listbox. To test I made a form and added a collection based listbox
> with two columns. To open it I made a method, created a collection with 10
> elements comprised of objects and had the listbox displace the data. I
> added a button, selected a row and ran the following code:

Thanks for taking the time to test. Perhaps there is something strange about my 
structure. But I'm directly testing by commenting out the dereference pointer 
method (does not work) and then using the named object method (works). This is 
converting previous code with the other types of listboxes that had no issues. 
In all cases I'm building the listboxes dynamically, maybe that has something 
to do with it.

I just tested this again in the debugger stepping through both cases:

ARRAY TEXT($colNames;0)
ARRAY TEXT($hdrNames;0)
ARRAY POINTER($colVars;0)
ARRAY POINTER($hdrVars;0)
ARRAY BOOLEAN($visible;0)
ARRAY POINTER($styles;0)

If (True)  //Bug in 17 - does not work with collection based listbox pointer.
  $name:=Pointer_name ($1)
  LISTBOX GET 
ARRAYS(*;$name;$colNames;$hdrNames;$colVars;$hdrVars;$visible;$styles)
Else 
  LISTBOX GET 
ARRAYS($1->;$colNames;$hdrNames;$colVars;$hdrVars;$visible;$styles)
End if 

$1 is a pointer to the collection listbox variable and the debugger shows it 
has 10 elements. The object name on the form is the same as the variable name. 
If I execute it with the name, $hdrVars has 4 elements. But all arrays have 
zero elements if I use the dereferenced pointer.


> The listbox correctly fired an On column moved event and *LISTBOX MOVED
> COLUMN NUMBER*(*;"listBox";$pos1;$pos2) correctly populated.

You tried this using a dereference pointer? This was the one that was not 
working last night that made me decide to post something.

Thanks,

John DeSoi, Ph.D.


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to