Hi Olivier, It's so interesting when someone follows up on a post from a year and a half ago.
I haven't used this code in v16 yet. But in general what I've found most reliable when fiddling with dynamic variables and listboxes is to let 4D tell you what it did by using the LISTBOX GET ARRAYS command. For example, if I add some arrays immediately after I'll call LISTBOX GET ARRAYS and use the array of pointers to the column variables. For whatever reason, and there are arguments to be had about why I shouldn't have to do this, I can't recall it not working. Same with the footer vars - go ahead and pass a nil pointer (easily derived by putting C_POINTER($nil) in your method) then use the pointer returned by 4D in LISTBOX GET ARRAYS. Like I said, 'yes, you should be able to pass a pointer and then use that pointer.' Sometimes yes, sometimes no. I don't really care - I just get the pointer arrays and it always works. I do this so much I found it handy to make a method that takes a listbox name and returns a specified array (colVars, footerVars, headerVars, etc.) so I don't have the overhead of directly calling LISTBOX GET ARRAYS. On Thu, May 11, 2017 at 10:18 PM, Flury Olivier via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Kirk & Miyako, > > I am struggling with the same problem, works interpreted but not compiled. > The type of the dynamic footer variable remains "2" (text). Tested with 4D > 16.1. > > Or did you figure out a way to make it work? > > If not, and if this is the way it works (not possible to re-type a dynamic > variable), then it makes the feature of inserting a dynamic footer variable > to a listbox useless. > > Or should I file a bug? > > Best, > > Olivier > > -----Ursprüngliche Nachricht----- > Von: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] Im Auftrag von Kirk > Brooks > Gesendet: Dienstag, 29. Dezember 2015 02:31 > An: 4D iNug Technical <4d_tech@lists.4d.com> > Betreff: Re: Problems with LISTBOX SET FOOTER CALCULATION and dynamic > columns (v15) > > I'll have to try comping later - deep in dev mode at the moment. Have to > finish this section and clean up to compile and test but I'm optimistic. > > On Mon, Dec 28, 2015 at 5:22 PM, Keisuke Miyako <keisuke.miy...@4d.com> > wrote: > > > I guess it is the result of retro-fitting a new feature (i.e. dynamic > > listbox using form local variables) without breaking language > compatibility. > > > > Yep - and I'm always talking about this sort of thing. In fact I even > described doing exactly this to Spencer for the array but just choked > taking it that next little step. Another example of how helpful this forum > is. > > -- > Kirk Brooks > San Francisco, CA > ======================= > ********************************************************************** > 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:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** > > ********************************************************************** > 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:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** > -- 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:4d_tech-unsubscr...@lists.4d.com **********************************************************************