Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Urgent seek for help: Odd errors when building a APP
Message
From
17/06/2008 22:46:11
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Urgent seek for help: Odd errors when building a APP
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01325010
Message ID:
01325010
Views:
59
Hi,

I have a form "DbcMnpl.scx" which runs prefectly when I DO it from the command window.
Today I decide to make it an APP, so I create a VFP project with a main.prg which contains a single line of code - DO that form. When I try to build a APP from the project manager, I receive:
Form i:\vfp9\prj\utl\hcltools\DbcMnpl\DbcMnpl.scx has the following errors:
  		Unknown ASRCRECORDS - Undefined
    		Unknown ACHILDALI - Undefined
The 2 unknown items: ASRCRECORDS and ACHILDALI are actutally (2nd and 3rd) parameters of a method "lCpUpTables" in that form. The exact code of that method is listed at the end of this post. Note that "ASRCRECORDS" with proper case is "aSrcRecords" and "ACHILDALI" is "aChildAli" in the method.
I try renaming the 2 variables in method "lCpUpTables", "ASRCRECORDS" to "ABC1" and "ACHILDALI" to "ABC2" and rebuild the APP, I got:
Form i:\vfp9\prj\utl\hcltools\DbcMnpl\DbcMnpl.scx has the following errors:
    		Unknown ABC1 - Undefined
    		Unknown ABC2 - Undefined
By the above test, I confirm the error message with the 2 unknowns are indeed pointing to the method "lCpUpTables" of the form.
I also try to compile the form directly from the command window and I get NO error at all.

My problem is, I couldn't figure out what is wrong with the code of that method? Why can't VFP treat them as parameters, instead try to resolve them as something else.

Any suggestion or clue so that I can build the APP correctly?

The code of the mentionded "lCpUpTables" method:
LPARAMETERS cSrcAlias, aSrcRecords, aChildAli, cErr
LOCAL lResult, nChdTblTtl, nChildAli, nSrcRec, nSrcRecTtl, aFoundRecs[1], oErr

lResult = .T.
TRY
	nSrcRecTtl = ALEN(aSrcRecords)
	nChdTblTtl = ALEN(aChildAli)

	* Loop through child tables
	FOR nChildAli = 1 TO nChdTblTtl
		THISFORM.uZerolizeCounters()

		* Loop through source table recs
		SELECT (THISFORM.cSrcAliPrefix + cSrcAlias)
		FOR nSrcRec = 1 TO nSrcRecTtl
			GOTO aSrcRecords[nSrcRec]
			IF !THISFORM.lCpUpChild(cSrcAlias, aChildAli[nChildAli], @aFoundRecs, @cErr)
				ERROR [Force EXIT]
			ENDIF
		ENDFOR
		THISFORM.uOut2File(aChildAli[nChildAli])
	ENDFOR
CATCH TO oErr WHEN oErr.ERRORNO = 1098
	lResult = .F.
ENDTRY
RETURN lResult
Please, any clue to tackle the problem will be very much appreciated.
Next
Reply
Map
View

Click here to load this message in the networking platform