I can give that a try, but I'm not sure if it will help, my old header also was returning a -1 when it ran to lookup what the 0 value was in the array. When running in interpreting mode it works exactly as expected. I am running this in client server mode under 15.3
Sent from my iPad > On Feb 13, 2017, at 7:57 PM, Donald Koffman via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > Try replacing Self with a pointer to the variable and recompile. > >> On Feb 13, 2017, at 5:40 PM, Eric Naujock via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >> >> >> I am taring to get my listbox code to compile and owkr properly. In >> interpreted mode it works great and no errors are generated. But if i >> Compile it the code fails telling my that I have an illegal index. It seems >> like the Find In Array function fails with a -1 result when I am compiled, >> but when I cam interpreted it works great. Is there a straightforward way to >> debug this in compiled mode? Or is there some fundamental quirk in compiled >> mode that I am missing. This code exists in my on after sort event. >> >> >> This is the code I am using. >> >> in the setup code I have OrderDirection defined as c_Boolean, and >> ColumnHeaderVars is an Array Pointer defined by the following. >> >> LISTBOX GET >> ARRAYS(Self->;ColumnNames;ColumnHeaders;ColumnVars;ColumnHeaderVars;ColumnVisible;ColumnStyles) >> >> $oldColHeader is defined as a c_Longint >> >> >> ColumnHeaderVars:=Find in array(ColumnHeaderVars;Self) >> $oldColHeader:=Find in array(ColumnHeaderVars;ColumnHeaderVars{0}) >> If ($oldColHeader=-1) >> $oldColHeader:=2 >> End if >> ColumnHeaderVars{0}:=ColumnHeaderVars{ColumnHeaderVars} >> If (ColumnHeaderVars=$oldColHeader) >> If (OrderDirection=False) >> ColumnHeaderVars{ColumnHeaderVars}->:=2 >> OrderDirection:=True >> Else >> ColumnHeaderVars{ColumnHeaderVars}->:=1 >> OrderDirection:=False >> End if >> Else >> ColumnHeaderVars{ColumnHeaderVars}->:=2 >> ColumnHeaderVars{$oldColHeader}->:=0 >> OrderDirection:=True >> End if >> >> >> ----------------------------------------------------------------------- >> >> MacCafe >> 4405 Talmadge St. >> Toledo, OH 43623 >> Eric Naujock - ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, >> 10.9, 10.10 >> http://www.mac-cafe.com >> email: e <mailto:e...@mac-cafe.com>r...@mac-cafe.com >> <mailto:e...@mac-cafe.com> >> AOL IM: erlic >> >> >> >> ********************************************************************** >> 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 > ********************************************************************** ********************************************************************** 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 **********************************************************************