1

I have a class: myClass_x.as with contents:

package com.a.b.c
{
    public namespace myClass_x = "com.a.b.c:myClass_x";
}

I have a second class: myClass_y with function:

myClass_x function myFunction(param1:int, param2:int, param3:int) : void {...}

I have a third class: myClass_z with function:

override myClass_x function myFunction(param1:int, param2:int, param3:int) : void {...}

When I try to compile, I get error:

1004: Namespace was not found or is not a compile-time constant.

Any ideas what's going wrong?

4

2 回答 2

1

你确定你已经在每个类的顶部导入了命名空间吗?

import com.a.b.c.myClass_x;

如果文件名与命名空间名称不完全匹配,您也可能会收到错误消息。

于 2013-07-10T04:58:17.547 回答
0

在您的课程块上方添加该行use namespace myClass_x;

于 2021-08-05T12:51:29.030 回答