开发者

Flash Packages and Inheritance

开发者 https://www.devze.com 2023-02-27 07:10 出处:网络
Why human cannot find God in this structure ? c:\\myproject\\src\\ main.as human.as com\\god\\ God.as 开发者_StackOverflow中文版IGod.as

Why human cannot find God in this structure ?

c:\myproject\src\
    main.as
    human.as
    com\god\
        God.as
   开发者_StackOverflow中文版     IGod.as

human.as :

import com.*;
public class human extend God implements IGod {

}


Because god is hiding in his own folder, and humans can only see files (ActionScript does not import recursively). If you import this way:

import com.god.*
public class human extend God implements IGod {
    ...
}

it should work.


"*" means all classes in that package, not all classes of all sub-packages of that package.

Try

import com.god.*;

Instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消