[mtasc] more feedback and private acesss specifier question
steve dawson
sydawson at gmail.com
Fri Dec 10 11:51:23 CET 2004
Hi Nicolos,
1. Shorcut constructor syntax, new Foo; for creating a new instance
without arguments should be allowed. Currently MTASC shows the error
"parse error Unexpected ;".
2. When using -pack with packages that are non existent MTASC does not
throw any error.
mtasc -cp "F:\flash\classLibrary" -pack org/nosuchpackage -swf
test.swf -header 400:400:31
I think an explicit error should be thrown here.
3. For classes with no super class or those extending Object,
super.methodName () seems to stall the compiler unexpectedly.
Eg:-
// in file Foo.as
class Foo
{
public function Foo ()
{
};
public function doFoo ():Void
{
super.doFoo ();
};
};
// at command prompt
mtasc Foo.as -swf test.swf -header 400:400:31
Without verbose on it prints,
Foo:doFoo
and then exits.
and with verbose on it prints,
Classpath : F:\flash\util\mtasc\beta7/std/;F:\flash\util\mtasc\beta7/;
Parsed F:\flash\util\mtasc\beta7/std/Number.as
Parsed F:\flash\util\mtasc\beta7/std/Object.as
Parsed F:\flash\util\mtasc\beta7/std/Boolean.as
Parsed F:\flash\util\mtasc\beta7/std/String.as
Parsed F:\flash\util\mtasc\beta7/std/Array.as
Parsed F:\flash\util\mtasc\beta7/std/Function.as
Parsed F:\flash\util\mtasc\beta7/std/StdPresent.as
Parsed Foo.as
Typing Foo.Foo
Typing Foo.doFoo
Foo:doFoo
and then exits.
4. With the MMC the private access specifier actually acts like the
protected access specifier of java. What does the private access
specifier of MTASC relate to. The reason i ask is, i am trying to do
super.methodname calls on private methods which gives the error, "type
error Cannot access private field doFoo".
If it really is "private" as i think it is, this might be major
shortcoming. Subclasses definitely need to be able to call super
methods. You shouldn't have to make them public to allow them to call
their super method. Else there needs to be an additional protected
access specifier. But this would break compatibility.
best regards,
steve
More information about the mtasc
mailing list