I'll look into it.  We haven't done much work with package internal.

-Alex

On 10/9/16, 9:25 PM, "Pan Li" <pa...@prominic.net> wrote:

>
>
>Actionscript document defines that internal (default) variable means: (the
>variable is )Visible to references inside the same package.
>
>But it doesn't compile correctly in FlexJS javascript mode in 0.7 and 0.6,
>it does build but the created javascript is broken:
>here is one simple class to reproduce the probelm:
>package
>{
>       public class SomeClass
>       {
>            var field:String = "hello";
>            public function doSomething():String
>            {
>                return field;
>            }
>       }
>}
>
>the code runs perfectly in Flex and runs perfectly in FlexJS awf mode, but
>in javascript mode the created javascript looks like:
>
>/**
> * @export
> * @type {string}
> */
>SomeClass.prototype.field = "hello";
>
>
>/**
> * @export
> * @return {string}
> */
>SomeClass.prototype.doSomething = function() {
>  return field;
>};
>above code fails in javascript
>
>
>If I use private or any other access control keyword:
>package
>{
>       public class SomeClass
>       {
>            private var field:String = "hello";
>            public function doSomething():String
>            {
>                return field;
>            }
>       }
>}
>
>the produced javascript is:
>
>/**
> * @private
> * @type {string}
> */
>SomeClass.prototype.field = "hello";
>
>
>/**
> * @export
> * @return {string}
> */
>SomeClass.prototype.doSomething = function() {
>       return this.field;
>};
>
>
>
>We had lots of existing Flex code which will be migrated to FlexJS, the
>default access control is used everywhere. If FlexJS changes syntax of
>actionscript, then there should be a document listing the difference, if
>syntax is not changed, then this is a bug needs to be fixed
>
>
>Thank you
>Pan Li
>My Apache Flex community contribution is working on the open source
>Moonshine-IDE.com for FlexJS.

Reply via email to