In my case I am flattening out c_objectc/fields. By definition I don’t know how many keys will be in whatever I’m finding. So I have to pre-declare my best guess + 10 to have them ready.
I think. There isn’t a way to do this in real time, is there? > On Jan 28, 2017, at 8:41 AM, Arnaud de Montard <[email protected]> wrote: > > >> Le 28 janv. 2017 à 00:03, Kirk Brooks <[email protected]> a écrit : >> >> I've settled on a 3 step methodology that works like this (which I was >> tweaking just the other day): >> >> 1) get the column var pointers from the Listbox get arrays command (wrapped >> in Listbox_get_colVarArray). >> 2) declare the variable type of those columns. >> 3) then populate the arrays.[...] > > I like that way, it sounds better than copy! I'll change my habits for my > next array listbox… > BTW, I use a wrapper for LISTBOX GET ARRAYS too: > <http://forums.4d.fr/Post/FR/13831994/1/14473507#14473507> > I was tired to declare 6 or more arrays just to get one. > > I have a question about typing in step 2 and SELECTION TO ARRAY (STA) in step > 3: > • STA interpreted will type the target array according to the source field > • STA compiled will strictly not accept "incompatible" source field and > target array (for example: STA(integerField;longintArray) throws an error) > • using STA 1st in a local array, then COPY ARRAY to a pointer on a column > listbox, I never noticed the array type way different from the field > This to say I'd be tempted by "JackSparrowing" step 2: remove. Do I miss > something? > > -- > Arnaud de Montard > > > > > ********************************************************************** > 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] **********************************************************************

