Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging techniques for templates
Message
From
05/11/2001 15:56:11
 
 
To
05/11/2001 15:42:19
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Miscellaneous
Thread ID:
00576293
Message ID:
00577594
Views:
11
When CodeBlock processes code interactively, it uses a 2-stage process. The first stage, called the PreProcessor, builds a map of the structure of the code, and detects things like SCAN/ENDSCAN mismatches, which tell it not to even bother trying to run the code.

You were seeing these types of messages, because you were trying to run something structured like a WC script as a WC template. In a template, each block of code is standalone. So something like a SCAN/ENDSCAN in a script, looks like 2 code blocks in a template, one with only a SCAN and one with only an ENDSCAN. Thus each produces an error.

One extra tip for debugging PreProcessing messages, if you can't detect it from the error message, is to copy the code into a VFP editor window, and try compiling it. You may find the error quickly that way.

In this instance, however, the real problem was just getting used to the WC concepts of templates vs. scripts. I wrote a description of this once, which I think Rick used as the basis of a KB help topic:

http://www.west-wind.com/wckb/whatsthedifferencebetweenatemplateandascript.htm

-- Randy

>Good catch Randy .. I was still hoping for additional debugging tips but it's time to close this one. Thanks.
>
>>Just to close this thread here...we discussed and resolved this item on the West-Wind message board last week. This was a Script vs. Template issue. -- Randy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform