DIMENSION laX(1) laX(1) = SPACE( 273 ) FOR EACH lcX IN laX ? lcX NEXTI'm guessing that it has to do with the the fact that I'm
************************************************************ DEFINE Class Click4Hits as _webform of _webview.vcx proc init() this._ioWeb = thisform.oleWebBrowser endproc proc _mLoop() LOCAL lcURL, loDoc, loFrame, lc, lcURL_Line LOCAL ln, lnTop lnTop = 1000000 do while .t. loDoc = THIS._ioWeb.DOCUMENT FOR ln = 1 TO lnTop IF VARTYPE(loDoc)<>'X' EXIT ENDIF ENDFOR IF VARTYPE(loDoc)='X' THISFORM._mSet_Status('Could Not create Document') EXIT ENDIF loFrame = loDoc.Frames(THIS._inFrame) &&THIS._inFrame = 0 FOR ln = 1 TO lnTop IF VARTYPE(loFrame)<>'X' EXIT ENDIF ENDFOR IF VARTYPE(loFrame)='X' THISFORM._mSet_Status('Could Not create Frame') EXIT ENDIF = ALINES( THIS._iaLines, loFrame.documentElement.outerHTML ) THIS._mSet_Search_String() ..... never gets this far ENDDO ..... more code endproc proc _mSet_Search_String() ***** code this part in sub-classes endproc ENDDEFINE ************************************************************* DEFINE class ClickSilo as Click4Hits proc _mSet_Search_String() ***** alen(THIS._iaLines)=35 at this point ***** and the FOR EACH loop crashes trying to access THIS._iaLines(35) ***** the if <some string> $ lc never evaluated true FOR EACH lc IN THIS._iaLines if <some string> $ lc ... other code exit endif ENDFOR && error stops on "ENDFOR" endproc ENDDEFINE when it crashed lc was '<TR>' if this helps the next element in THIS._iaLines is: (I put in chr(13) to keep your screen narrow) <TD vAlign=top align=right width=468><A href="http://www.freenetleads.com/free/990430hun/index.shtml" target=_blank><IMG src="http://www.clicksilo.com/images/members/free-leads-banner-orbl.gif" border=1></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML> FWIW I tried FOR EACH ... NEXT and it still crashed trying to read the last element that was 273 characters long>Hi Bill,