I have a small quibble about imports. It took me a little while to realize that imports from different files produce different namespaces according to the filename. But what if I don't want everything namespaced by file? Eg. I have a particle class, which is now in a file particle.monkey. Is there any way I can avoid having to refer to it by particle.particle.method?
This question was also asked two months ago here http://www.monkey-x.com/Community/posts.php?topic=7947&post=78854 and was never addressed.
Edit: Well, I figured out that I can solve the problem with Alias. Cool enough.
Import particle
Alias Tparticle = particle.particle
Function Main:Int()
Local testparticle:Tparticle = New Tparticle
end
I just ask these questions here because it causes me to solve the problem magically myself two minutes after I post.
Oh, and now for many other cases it works the way I expected and I don't run into namespace issues and I don't need Alias. Presumably this is because the filename is not the same as my classname. Fine, fine, whatever.
|