Applies to: an extension template reported in April 2016; the thread mentions a Clarion10 template folder. Chain not named.
Problem
A procedure extension declares a CLASS at #AT(%DataSection) and its methods at #AT(%LocalProcedures). When the extension was added to several procedures in one module, the poster feared the methods were duplicated and asked how to generate them only once per module.
Solution
- The class declared in %DataSection is local to its procedure, so each procedure needs its own instance and its own method declarations at %LocalProcedures. Leaving them out causes errors.
- A plain Clarion example in the thread, two procedures in one PROGRAM each declaring
LocClass,typewithLocClass.method, compiled and ran without errors. - The poster then confirmed the same with his extension: the errors he had seen were spurious ones, raised for something the compiler could detect but not identify in the source.
- Ideas offered before that, which the poster did not need: move the class to an INCLUDE with
,ONCEin a global embed and give each instance a name built from %ActiveTemplateInstance; or split into two dependent templates.
Caveats
- The thread does not say what the real error was; only that it was not the duplicated methods.
- One poster guessed, untested, that the link map prefixes local methods with the parent procedure name.
- The module name is not available to the extension through any symbol named in the thread.
Today (2026)
Likely still holds, as it follows from local-scope rules; not re-tested on a current build.
Sources: Kevin D. (Apr 2016, the question), Lee W. (Apr 2016), Carl S. (Apr 2016, Jun 2016), Graham D. (Apr 2016) in softvelocity.clarion.templates.