Hi Kirk Yes all the arrays are Text Arrays. My aim is to import all the data and load it into the various arrays. The basic problem is that I dont know in advance, how much data there will be. Think of it like this. There maybe beween 1 and lets say 16 audio channels. each audio channel maybe divided into between 1 and several hundred segments. each boundry beween segments will have 14 parameters.. the only thing I know in advance is that each segment boundry will have 14 parameters, I can read all the data, its just a case of filling the correct number of arrays. The User will be able to choose which of the upto 16 channels they want view data for. I will then transfer the contents of the appropriate arrays for the chosen channel into a listbox for display On the face of it, it should be fairly simple, its just not knowing how many arrays are required in advance thats giving me the problems. I shall look at your code and see if I can fit it to my requirements Thanks -pm
On Tue, Oct 31, 2017 at 8:47 PM, Kirk Brooks via 4D_Tech < [email protected]> wrote: > Peter, > This is easy to do with local arrays and dynamic variables. It looks like > you only need to build text arrays. You can declare a local array, ARRAY > TEXT($aText2d;0;0). Then you can resize this to add more 'columns' as > needed and populate them. > > Next you need to populate the listbox. First delete all the existing > columns (if any) then insert the number of columns you need. To use dynamic > vars you pass Nil for the column and header vars. Let's say you need 4 > columns, it looks like this: > > LISTBOX DELETE COLUMNS(*;"listboxName";1;LISTBOX GET NUMBER > COLUMNS(*;"listboxName")) > > C_POINTER($nil) > > For($j;1;4) > > LISTBOX INSERT COLUMN (*;"listboxName"; $j; "col_"+string($j); $nil; > "hdr_"+string($j); $nil) > > $colPtr:=object get pointer(Object named;"col_"+string($j)) // now 4D has > created a variable for the column and we can get its pointer > > COPY ARRAY($aText2d{$j};$colPtr->) // and copy the data to that array > > End for > > Even if you need mixed data types I'd still use text arrays for handling > the display and user interface and do the data conversion on in the > background. You can use the same approach with different types of arrays > but it's a lot more work whereas converting to and from text is easy. And > this works complied. > > D > oes that make sense? Do I get your need correctly? > > On Tue, Oct 31, 2017 at 12:42 PM, Peter Mew via 4D_Tech < > [email protected]> wrote: > > > Thank You > > And How do I create the Arrays in the First Place > > -pm > > > > > -- > Kirk Brooks > San Francisco, CA > ======================= > > *The only thing necessary for the triumph of evil is for good men to do > nothing.* > > *- Edmund Burke* > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** > ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

