English

Error: Compiling script: < NAME > is both a variable and a class

Solution or Workaround

Why does ompiling a script returns this error?

< NAME > is both a variable and a class

Answer:

A variable can't have the same name as a class. ArcView has a number of private and hidden classes, which are undocumented; a variable cannot use one of these hidden class names either. If you receive this error and cannot find a class name that is being duplicated, it is very likely you are using the name of a hidden class. En either case, you need to change then name of the variable.

Notes:

A Class is a template which describes properties and the requests for a logical group of similar objects. Objects of the same kind belong to the same class. All objects created from the same class have the same set of properties and can carry out the same requests. Objects created from different classes have a different set of properties and respond to different requests.

For more information on writing and compiling scripts in Avenue see the on-line Avenue help and tutorial. For more information on Classes, public and private, see the "Customizing with ArcView and Avenue" book.