Kbase P138812: USING causes compiler to return errors when class is in PROPATH directory
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  19/12/2008 |
|
Status: Unverified
SYMPTOM(s):
Name of the class in the CLASS statement '' must match the pattern of the name of the file ''. (12629)
USING causes compiler to return errors when class is in PROPATH directory
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
CAUSE:
When a variable of type CLASS <classname> is defined and the compiler looks to resolve it, the first thing it looks for are USING statements. When the class is found in a namespace specified with USING, the name of the class is resolved to the namespace specified in the USING plus '.<classname>'. The compiler will look no further to try and resolve the class reference, so if the class name isn't qualified with the namespace errors will occur.
e.g.
/*.\subdir\myclass.cls*/
CLASS myclass:
.....
END CLASS.
PROPATH=.,.\subdir
/* foo.p */
DEFINE VARIABLE omyclass AS myclass.cls.
omyclass = NEW myclass.cls().
FIX:
Either remove the USING statement, since it's not entirely necessary when classes are in the PROPATH, or qualify the class name with the namespace.