Hey John,
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:

*LISTBOX GET CELL POSITION*(*;"listBox";$column;$row)


$ptr:=*OBJECT Get pointer*(Object named;"listBox")

*LISTBOX SELECT ROW*($ptr->;2)


*LISTBOX SELECT ROW*(*;"listBox";2)


*ARRAY BOOLEAN*($aVisible;0)

*ARRAY POINTER*($aColVars;0)

*ARRAY POINTER*($aHeaderVars;0)

*ARRAY POINTER*($aStyles;0)

*ARRAY TEXT*($aColNames;0)

*ARRAY TEXT*($aHeaderNames;0)


*LISTBOX GET ARRAYS*(*;"listBox";$aColNames;$aHeaderNames;$aColVars;
$aHeaderVars;$aVisible;$aStyles)


*OBJECT GET COORDINATES*(*;"listBox";$left;$top;$right;$bottom)


Everything worked as expected. $aColVars contains all null values but
that's expected because there are no arrays. The column names and other
vars populated correctly.

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

I didn't try OBJECT MOVE.

Perhaps the code you tested was using a pointer to the boolean array of the
array listbox? If you modify your code, just to test, to use the object
name instead of the pointer do you still get the unexpected results?

On Tue, Jan 22, 2019 at 7:56 PM John DeSoi via 4D_Tech <[email protected]>
wrote:

> 17.0 HF4 Mac
>
> I've noticed that a lot of generic listbox code fails with collection
> variables. For example, in passing a listbox pointer to a method such as
>
> LISTBOX SELECT ROW($arrayListbox->;$row) `works
>
> LISTBOX SELECT ROW($selectionLisbox->;$row) `works
>
> LISTBOX SELECT ROW($collectionLisbox->;$row) `does not work
>
> Other commands that don't seem work the same with collection list boxes
> include:
>
> LISTBOX GET ARRAYS
> LISTBOX MOVED COLUMN NUMBER
> OBJECT GET COORDINATES
> OBJECT MOVE
>
> Something to watch out for if you are converting code to work with
> collection listboxes. You have to change everything to use the object name
> instead of the variable.
>
> 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:[email protected]
> **********************************************************************



-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to