2 questions:

1. Why literal notation for JS output? Is it the only output mode available?
2. adobe.extend / adobe.classes? shouldn't be apache?

Dan

On 11/24/2012 1:00 PM, Michael Schmalle wrote:
Hey,

I try to avoid the command line when ever possible. :)

I set up a simple runner just like we did in functional testing using the;

MXMLJSC.main(args);


For those that are interested, MainCode.as;


package
{
    public class MainCode
    {
        public function MainCode()
        {

        }

        public var foo:String;

        private var bar:int = 0;

        public function get baz():String
        {
            return foo;
        }

        public function set baz(value:String):void
        {
            foo = value;
        }
    }
}

and TestApp.as

package
{
    public class TestApp
    {
        private var linker:MainCode;

        public function TestApp()
        {

        }
    }

}


Produces the following .js file;


/*
 CROSS-COMPILED BY MXMLJSC (329449.1) ON 2012-11-24 07:54:52
 */
MainCode = adobe.extend("MainCode", Object, {
    init : function() {
        return this
    },
    foo : void 0,
    bar : 0,
    get_baz : function() {
        return this.foo
    },
    set_baz : function(a) {
        this.foo = a
    }
});
MainCode.prototype._CLASS = MainCode;
MainCode._PACKAGE = adobe.globals;
MainCode._NAME = "MainCode";
MainCode._FULLNAME = "MainCode";
MainCode._SUPER = Object;
MainCode._NAMESPACES = {
    "foo::2" : !0,
    "bar::7:MainCode" : !0,
    "baz::2" : !0,
    "baz::2" : !0
};
adobe.classes.MainCode = MainCode;



Mike





Quoting Cyrill Zadra <cyrill.za...@gmail.com>:

Sure.. just commited.

Cyrill

On Sat, Nov 24, 2012 at 12:05 AM, Alex Harui <aha...@adobe.com> wrote:
Please checkin your changes to build.xml, the manifest, and make a note in
the README.

Thanks,
-Alex


On 11/23/12 11:27 PM, "Cyrill Zadra" <cyrill.za...@gmail.com> wrote:

Finally .. I could compile a js file Yihaa  ;-).

There were 2 things todo:

1) I had to remove the absolute path in the MANIFEST.MF to the falcon
compiler.jar through a relative one.

2) The command  ./bin/mxmlc MainCode.as returns a

java.lang.NullPointerException
        at java.io.File.<init>(File.java:222)
at org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:483)
        at
org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:217)
        at
org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:177)
at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:153)

But with following command everything works fine.
../bin/mxmlc MainCode.as -output MainCode.js

On Fri, Nov 23, 2012 at 10:42 PM, Alex Harui <aha...@adobe.com> wrote:
that will dump out the jar and see if that class is in there or not.

--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui




Reply via email to