RE: Royale compiler not handling Date.fullYear etc

2018-06-29 Thread Frost, Andrew
Hi

Those date tests already test the mapping, and are running fine. They're not 
getting stuck at the earlier stage which is where the original problem lay. So 
I'd been thinking of adding a new test file under the below folder, where other 
AS-specific testing is happening:
royale-compiler/compiler/src/test/java/as

In terms of the read-only properties, I would have hoped that the definition in 
missing.js could be written:
/**
 * @type {number}
 * @property
 * @readonly
 */
Date.prototype.timezoneOffset;

but the JSDoc parser isn't able to pick up/report upon the 'property' or 
'readonly' usage. We could add support for these perhaps, manually within the 
FieldReference.java file (which is where these properties are coming in 
currently) we could manually look for the "@property" and/or "@readonly" tags 
within the comment.getOriginalCommentString() value; I would have preferred to 
be able to call "comment.isReadOnly" or similar, but to get to that requires 
changing Google's code..

So yes, hold off doing anything with the pull requests for now, I'll see 
whether I can get it to do things from the typedefs side of things...

One extra note: I'm finding two "missing.js" files which aren't being kept in 
sync at all (by the build tools); is this by design or should there be some 
kind of a link between them?
royale-typedefs\js\src\main\javascript\missing.js
royale-compiler\compiler-externc\src\test\resources\typedefs\unit_tests\missing.js


thanks

   Andrew



-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: 29 June 2018 17:38
To: dev@royale.apache.org
Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc

There are Date tests in TestRoyaleGlobalClasses.java

In this case, the issue may be in how to set up a copy of the tests to work 
with js.swc instead of playerglobal.swc.

Regarding read-only properties, I think the externc compiler might have a way 
of doing that.  It would likely involve one of the JSDoc annotations or an 
interface.  And the result should be a getter without a setter.  I don't have 
time to look for it right now.  It would be best to deal with this in the 
typedefs instead of in the compiler, IMO.

My 2 cents,
-Alex

On 6/29/18, 7:47 AM, "Frost, Andrew"  wrote:

".. not yet" is probably the most appropriate response!!

I had wondered whether it would need some formal self-tests adding, I'll 
have a dig around to see how to do this bit :-)

thanks

   Andrew


-Original Message-
From: Harbs [mailto:harbs.li...@gmail.com] 
Sent: 29 June 2018 13:35
To: dev@royale.apache.org
Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc

Cool. Are there compiler tests for these Date additions?





Re: Arrays and types

2018-06-29 Thread Carlos Rovira
Hi,

another thing we could do is support TypeScript at same level as AS3. What
do you think about this?
Maybe this could make more people come to Royale. TypeScript seems the
language of this days, and maybe parsers and tools to integrate it should
be available so maybe, it could be a task doable...



2018-06-29 18:28 GMT+02:00 Alex Harui :

> Some features of other development environments are "language" and some
> are "runtime/platform".  The easiest test for determining the difference is
> in the output.  In the case of TypeScript, just about every feature
> transpiles into JavaScript so it is all Language features and we could
> teach our compiler to also output some JavaScript or ActionScript
> equivalents.
>
> Vector, one the other hand, is implemented in Flash, and Uint8Array is
> implemented in the browser, so these are runtime/platform features.  These
> are two different ways of implementing TypedArrays.  I find Vector a bit
> hard to work with, but I think it might be the most type-safe by making
> type-conversion or type-casting hard or slow.  Sometimes that's what you
> want, and sometimes not.
>
> Because we want small/fast code and are currently focused on the browser,
> if folks are happy with how Uint8Array and friends would work in a
> type-safe runtime, it makes sense to me to just expose it.   If folks want
> to use the same API in SWF code, someone will have to emulate in in SWF
> code.  It is essentially the reverse workflow from E4x, TLF, and the
> MX/Spark Emulations.  Instead of emulating existing SWF libraries in JS, we
> are emulation existing Browser APIs in SWF code (if anyone actually needs
> it).
>
> My 2 cents,
> -Alex
>
> On 6/29/18, 1:28 AM, "carlos.rov...@gmail.com on behalf of Carlos
> Rovira" 
> wrote:
>
> Hi,
>
> I expect we evolve our languages and compilers to be smarter and we get
> things like Typed Arrays, Generics, and other things other since
> TypeScript
> or haXe already supports it. So I talk with many people that said me
> "why
> use AS3 when I can use TypeScript that has all this things and are most
> widely supported?"... and we must said that this people are right...
>
> This is not my zone of expertise, so hope others could make this
> happen. I
> think we have the tools and all the pieces to do this, so it's a
> matter of
> having the right people that want to make this possible.
>
> Thanks
>
> Carlos
>
>
> 2018-06-29 10:12 GMT+02:00 Harbs :
>
> > There is something I’ve been struggling with:
> >
> > AS3 does not have “typed” arrays. The closest it has is Vectors. The
> > problem with vectors is two-fold. First of all, the cross compiler
> uses
> > Language to construct the vector rather than simply declaring an
> array.
> > This could probably be fixed though. The second problem is that it’s
> > awkward converting between arrays and vectors. This is especially
> > problematic when you want to “cast” an array retrieved from say JSON
> to a
> > typed Vector. It’s also a problem if you want to use Array features
> such as
> > map and the like.
> >
> > I’m not sure what the right solution to improving this would be.
> Expand
> > Vector to allow arrays and Vectors to be cast as each other? Create
> a new
> > “array type" declaration (i.e. var arr:String[] = [“foo”,”baz”];)?
> > Something else?
> >
> > Thoughts?
> > Harbs
> >
> >
>
>
> --
> Carlos Rovira
> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%
> 7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636658576937928781=D78a%
> 2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D=0
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira


Re: how to get a component nest Childs in some inner html tag

2018-06-29 Thread Carlos Rovira
Hi Alex,

thanks for the explanation I think finaly understand the main difference
between Group and Container. Although, I see Group seems to have many
things already setup to be able to do have this feature. Don't know if
having two separate components make sense, or there's more differences?

Regarding the concrete case, for now I'm using this code:

override public function addElement(c:IChild, dispatchEvent:Boolean = true):
void
{
COMPILE::SWF
{
...
}
COMPILE::JS
{
nav.appendChild(c.positioner);
(c as IUIBase).addedToParent();
}
}

So I have a "nav" html nested tag, and there's where things are added.
Is still early code, so maybe I should refactor it, but is a very concrete
use for HTML (maybe SWF will not need this)

I must say that as I dig more and more in new html5 components and layouts
I see each time that things use to be created nesting some tags to have the
final desired use case. In SWF things can be more simpler or less nesting
(but as normal, more code too)

Thanks Alex


2018-06-29 18:13 GMT+02:00 Alex Harui :

> Container creates a ContainerContentArea as its child and then all
> children become children of the ContainerContentArea.  Group does not do
> that.  The concept of having an inner content area forms the basis of
> complex containers with "chrome" around it, such as Panel.  I'm not sure
> how your requirements about positioner are different from what Container
> and Panel do, so you might need to provide more detail about the
> differences.
>
> HTH,
> -Alex
>
> On 6/29/18, 8:17 AM, "carlos.rov...@gmail.com on behalf of Carlos
> Rovira" 
> wrote:
>
> Hi,
>
> I trying to find the best route to have a container component that has
> some
> nested html tag structure and adding child elements will be added to
> the
> inner element, but the rest of normal behavior (id, listeners, etc..)
> will
> be referencing the positioner.
>
> What's the best way to do this? Use Group or Container? what I should
> override? get host() method in BeadViewBase should be override? how?
>
> Hope you could point to the best way of doing this
>
> thanks
>
> --
> Carlos Rovira
> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%
> 7Cbef963261fdf463682d308d5ddd37182%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636658822573164461=kLJNuz8V8r46O6YvTUm5TuQHx78VXn
> rPSbAbp2p%2BOLg%3D=0
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Royale compiler not handling Date.fullYear etc

2018-06-29 Thread Alex Harui
There are Date tests in TestRoyaleGlobalClasses.java

In this case, the issue may be in how to set up a copy of the tests to work 
with js.swc instead of playerglobal.swc.

Regarding read-only properties, I think the externc compiler might have a way 
of doing that.  It would likely involve one of the JSDoc annotations or an 
interface.  And the result should be a getter without a setter.  I don't have 
time to look for it right now.  It would be best to deal with this in the 
typedefs instead of in the compiler, IMO.

My 2 cents,
-Alex

On 6/29/18, 7:47 AM, "Frost, Andrew"  wrote:

".. not yet" is probably the most appropriate response!!

I had wondered whether it would need some formal self-tests adding, I'll 
have a dig around to see how to do this bit :-)

thanks

   Andrew


-Original Message-
From: Harbs [mailto:harbs.li...@gmail.com] 
Sent: 29 June 2018 13:35
To: dev@royale.apache.org
Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc

Cool. Are there compiler tests for these Date additions?





Re: Migrating Enterprise Flex Application

2018-06-29 Thread Alex Harui
It might depend on what kind of errors.  Try the api-report, see what you get 
and think about whether it makes sense.

Thanks,
-Alex

On 6/29/18, 1:49 AM, "chembali"  wrote:

I skipped the offending mxml and the compiling of my first component
completed. It is giving me a bunch of errors. Should I try to fix these
compile errors or can I just rerun with the api-report option to generate
the report?



--
Sent from: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F=02%7C01%7Caharui%40adobe.com%7Cd2dd3ad949f247d6dc6f08d5dd9d34a9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658589616866998=%2BClOZd%2BH%2B6N1bEY52GPwgfJjFRbgK%2BrwxiiK1DOVCHo%3D=0




Re: Arrays and types

2018-06-29 Thread Alex Harui
Some features of other development environments are "language" and some are 
"runtime/platform".  The easiest test for determining the difference is in the 
output.  In the case of TypeScript, just about every feature transpiles into 
JavaScript so it is all Language features and we could teach our compiler to 
also output some JavaScript or ActionScript equivalents.

Vector, one the other hand, is implemented in Flash, and Uint8Array is 
implemented in the browser, so these are runtime/platform features.  These are 
two different ways of implementing TypedArrays.  I find Vector a bit hard to 
work with, but I think it might be the most type-safe by making type-conversion 
or type-casting hard or slow.  Sometimes that's what you want, and sometimes 
not.

Because we want small/fast code and are currently focused on the browser, if 
folks are happy with how Uint8Array and friends would work in a type-safe 
runtime, it makes sense to me to just expose it.   If folks want to use the 
same API in SWF code, someone will have to emulate in in SWF code.  It is 
essentially the reverse workflow from E4x, TLF, and the MX/Spark Emulations.  
Instead of emulating existing SWF libraries in JS, we are emulation existing 
Browser APIs in SWF code (if anyone actually needs it).

My 2 cents,
-Alex

On 6/29/18, 1:28 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" 
 wrote:

Hi,

I expect we evolve our languages and compilers to be smarter and we get
things like Typed Arrays, Generics, and other things other since TypeScript
or haXe already supports it. So I talk with many people that said me "why
use AS3 when I can use TypeScript that has all this things and are most
widely supported?"... and we must said that this people are right...

This is not my zone of expertise, so hope others could make this happen. I
think we have the tools and all the pieces to do this, so it's a matter of
having the right people that want to make this possible.

Thanks

Carlos


2018-06-29 10:12 GMT+02:00 Harbs :

> There is something I’ve been struggling with:
>
> AS3 does not have “typed” arrays. The closest it has is Vectors. The
> problem with vectors is two-fold. First of all, the cross compiler uses
> Language to construct the vector rather than simply declaring an array.
> This could probably be fixed though. The second problem is that it’s
> awkward converting between arrays and vectors. This is especially
> problematic when you want to “cast” an array retrieved from say JSON to a
> typed Vector. It’s also a problem if you want to use Array features such 
as
> map and the like.
>
> I’m not sure what the right solution to improving this would be. Expand
> Vector to allow arrays and Vectors to be cast as each other? Create a new
> “array type" declaration (i.e. var arr:String[] = [“foo”,”baz”];)?
> Something else?
>
> Thoughts?
> Harbs
>
>


-- 
Carlos Rovira

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658576937928781=D78a%2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D=0




Re: how to get a component nest Childs in some inner html tag

2018-06-29 Thread Alex Harui
Container creates a ContainerContentArea as its child and then all children 
become children of the ContainerContentArea.  Group does not do that.  The 
concept of having an inner content area forms the basis of complex containers 
with "chrome" around it, such as Panel.  I'm not sure how your requirements 
about positioner are different from what Container and Panel do, so you might 
need to provide more detail about the differences.

HTH,
-Alex

On 6/29/18, 8:17 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" 
 wrote:

Hi,

I trying to find the best route to have a container component that has some
nested html tag structure and adding child elements will be added to the
inner element, but the rest of normal behavior (id, listeners, etc..) will
be referencing the positioner.

What's the best way to do this? Use Group or Container? what I should
override? get host() method in BeadViewBase should be override? how?

Hope you could point to the best way of doing this

thanks

-- 
Carlos Rovira

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7Cbef963261fdf463682d308d5ddd37182%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658822573164461=kLJNuz8V8r46O6YvTUm5TuQHx78VXnrPSbAbp2p%2BOLg%3D=0




how to get a component nest Childs in some inner html tag

2018-06-29 Thread Carlos Rovira
Hi,

I trying to find the best route to have a container component that has some
nested html tag structure and adding child elements will be added to the
inner element, but the rest of normal behavior (id, listeners, etc..) will
be referencing the positioner.

What's the best way to do this? Use Group or Container? what I should
override? get host() method in BeadViewBase should be override? how?

Hope you could point to the best way of doing this

thanks

-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Royale compiler not handling Date.fullYear etc

2018-06-29 Thread Frost, Andrew
".. not yet" is probably the most appropriate response!!

I had wondered whether it would need some formal self-tests adding, I'll have a 
dig around to see how to do this bit :-)

thanks

   Andrew


-Original Message-
From: Harbs [mailto:harbs.li...@gmail.com] 
Sent: 29 June 2018 13:35
To: dev@royale.apache.org
Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc

Cool. Are there compiler tests for these Date additions?



Re: Royale compiler not handling Date.fullYear etc

2018-06-29 Thread Harbs
Cool. Are there compiler tests for these Date additions?

> On Jun 29, 2018, at 3:03 PM, Frost, Andrew  wrote:
> 
> Yes - it needed changes both in the typedefs and in the compiler; and also, 
> this is just to workaround the syntax checking part, as the conversion that 
> was already present will now kick in..
> 
> Did a few tests on it and noticed that I could assign to the timezoneOffset 
> [read-only] property, although nothing actually happened when I did so. So 
> I've added a check for this one, it feels a bit manual/hacky but I don't know 
> of any alternative approach..
> 
> Pull requests just created on the typedefs and the compiler projects; they 
> should really be taken together otherwise it could get problematic!
> 
> thanks
> 
>   Andrew
> 
> 
> -Original Message-
> From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
> Sent: 28 June 2018 22:17
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc
> 
> I think Andrew got it right, but I believe he is still adding fullYear and 
> others to Date in missing.js.  It is ok for us to add APIs that exist in 
> Flash that don't exist in the browser if we map them to browser APIs that do 
> exist.  In this case, the browser's Date.getFullYear/setFullYear.  No 
> polyfill is needed.  We have done this sort of thing for other mismatches 
> between Flash and the browser.  It is smaller/faster to handle these known 
> builtin APIs in the compiler than to create polyfills for them when we can.  
> But Language does contain some polyfills for Array.
> 
> The reason Andrew had to add the lines he did is because in externs/typedefs 
> like missing.js, the only way to specify an Accessor (a getter/setter) is by 
> having a corresponding definition in an interface in the externs.  Date 
> doesn't implement any interfaces, so the definition ends up as a Variable (a 
> var).  The code for isDateProperty was expecting the Flash definition of Date 
> which does have fullYear and all other properties as Accessor.  I think it 
> was reasonable to allow Variables as well.
> 
> Andrew, if you can package up your changes as patches or pull requests, that 
> would be great.  I probably won't be able to get to it until Sunday, but 
> maybe someone else will accept your changes.
> 
> Thanks,
> -Alex
> 
> On 6/28/18, 12:14 PM, "Harbs"  wrote:
> 
>It sounds like you’re right and adding it to the Date definitions in 
> missing.js is not the right way to go about it. That assumes it’s defined in 
> the browser which it’s not… The only way that would work would be to polypill 
> the global Date object which we don’t want to do.
> 
>I’m guessing something along the lines of your original suggestion is the 
> right way to go about it, but I’m definitely not an expert on the compiler.
> 
>Thanks,
>Harbs
> 
>> On Jun 28, 2018, at 10:07 PM, Frost, Andrew  wrote:
>> 
>> Okay here's the conclusion:
>> 
>> JSRoyaleEmitter.isDateProperty() is returning false now, because we do 
>> actually have a definition for the property name (rightDef is no longer 
>> null, so we don't go into the next check..).
>> 
>> isDateProperty() is called from three places (BinaryOperatorEmitter, 
>> MemberAccessEmitter, VarDeclarationEmitter) but then where necessary it uses 
>> the actual DatePropertiesSetters/Getters lists to convert the output.
>> 
>> Given that we don't have any other properties on the Date object, it should 
>> be feasible to add an extra condition under the "rightDef instanceof 
>> AccessorDefinition", to also check "rightDef instanceof VariableDefinition" 
>> and return true (unless people think we should also go through the 
>> DatePropertiesSetters/Getters lists to double-check that it's a property 
>> that can be converted?)
>> 
>> This now works: so with the changes to the missing.js, we also have:
>>  if (leftDef != null && 
>> leftDef.getQualifiedName().equals("Date"))
>>  {
>>  if (rightDef instanceof AccessorDefinition)
>>  return true;
>> +else if (rightDef instanceof VariableDefinition)
>> +return true;
>>  else if (rightDef == null && 
>> rightNode.getNodeID() == ASTNodeID.IdentifierID)
>>  {
>>  if (writeAccess)
>>  {
>> 
>> and it works...
>> 
>> 
>> 
>> thanks
>> 
>>  Andrew
>> 
>> 
>> -Original Message-
>> From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
>> Sent: 28 June 2018 19:37
>> To: dev@royale.apache.org
>> Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc
>> 
>> Hi
>> 
>> Thanks Alex for the explanation and background! Yes I think that the 
>> BinaryOperatorEmitter code is kicking in to do the actual conversion during 
>> the emitting phase, so that bit works fine; it 

RE: Royale compiler not handling Date.fullYear etc

2018-06-29 Thread Frost, Andrew
Yes - it needed changes both in the typedefs and in the compiler; and also, 
this is just to workaround the syntax checking part, as the conversion that was 
already present will now kick in..

Did a few tests on it and noticed that I could assign to the timezoneOffset 
[read-only] property, although nothing actually happened when I did so. So I've 
added a check for this one, it feels a bit manual/hacky but I don't know of any 
alternative approach..

Pull requests just created on the typedefs and the compiler projects; they 
should really be taken together otherwise it could get problematic!

thanks

   Andrew


-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: 28 June 2018 22:17
To: dev@royale.apache.org
Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc

I think Andrew got it right, but I believe he is still adding fullYear and 
others to Date in missing.js.  It is ok for us to add APIs that exist in Flash 
that don't exist in the browser if we map them to browser APIs that do exist.  
In this case, the browser's Date.getFullYear/setFullYear.  No polyfill is 
needed.  We have done this sort of thing for other mismatches between Flash and 
the browser.  It is smaller/faster to handle these known builtin APIs in the 
compiler than to create polyfills for them when we can.  But Language does 
contain some polyfills for Array.

The reason Andrew had to add the lines he did is because in externs/typedefs 
like missing.js, the only way to specify an Accessor (a getter/setter) is by 
having a corresponding definition in an interface in the externs.  Date doesn't 
implement any interfaces, so the definition ends up as a Variable (a var).  The 
code for isDateProperty was expecting the Flash definition of Date which does 
have fullYear and all other properties as Accessor.  I think it was reasonable 
to allow Variables as well.

Andrew, if you can package up your changes as patches or pull requests, that 
would be great.  I probably won't be able to get to it until Sunday, but maybe 
someone else will accept your changes.

Thanks,
-Alex

On 6/28/18, 12:14 PM, "Harbs"  wrote:

It sounds like you’re right and adding it to the Date definitions in 
missing.js is not the right way to go about it. That assumes it’s defined in 
the browser which it’s not… The only way that would work would be to polypill 
the global Date object which we don’t want to do.

I’m guessing something along the lines of your original suggestion is the 
right way to go about it, but I’m definitely not an expert on the compiler.

Thanks,
Harbs

> On Jun 28, 2018, at 10:07 PM, Frost, Andrew  
wrote:
> 
> Okay here's the conclusion:
> 
> JSRoyaleEmitter.isDateProperty() is returning false now, because we do 
actually have a definition for the property name (rightDef is no longer null, 
so we don't go into the next check..).
> 
> isDateProperty() is called from three places (BinaryOperatorEmitter, 
MemberAccessEmitter, VarDeclarationEmitter) but then where necessary it uses 
the actual DatePropertiesSetters/Getters lists to convert the output.
> 
> Given that we don't have any other properties on the Date object, it 
should be feasible to add an extra condition under the "rightDef instanceof 
AccessorDefinition", to also check "rightDef instanceof VariableDefinition" and 
return true (unless people think we should also go through the 
DatePropertiesSetters/Getters lists to double-check that it's a property that 
can be converted?)
> 
> This now works: so with the changes to the missing.js, we also have:
>   if (leftDef != null && 
leftDef.getQualifiedName().equals("Date"))
>   {
>   if (rightDef instanceof AccessorDefinition)
>   return true;
> + else if (rightDef instanceof VariableDefinition)
> + return true;
>   else if (rightDef == null && 
rightNode.getNodeID() == ASTNodeID.IdentifierID)
>   {
>   if (writeAccess)
>   {
> 
> and it works...
> 
> 
> 
> thanks
> 
>   Andrew
> 
> 
> -Original Message-
> From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
> Sent: 28 June 2018 19:37
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc
> 
> Hi
> 
> Thanks Alex for the explanation and background! Yes I think that the 
BinaryOperatorEmitter code is kicking in to do the actual conversion during the 
emitting phase, so that bit works fine; it was just earlier on (and as you 
suggest, a think it's trying to build some ABC from the parsed tree which is 
where this issue came up - 

Re: Migrating Enterprise Flex Application

2018-06-29 Thread chembali
I skipped the offending mxml and the compiling of my first component
completed. It is giving me a bunch of errors. Should I try to fix these
compile errors or can I just rerun with the api-report option to generate
the report?



--
Sent from: http://apache-royale-development.20373.n8.nabble.com/


Re: Arrays and types

2018-06-29 Thread Carlos Rovira
Hi,

I expect we evolve our languages and compilers to be smarter and we get
things like Typed Arrays, Generics, and other things other since TypeScript
or haXe already supports it. So I talk with many people that said me "why
use AS3 when I can use TypeScript that has all this things and are most
widely supported?"... and we must said that this people are right...

This is not my zone of expertise, so hope others could make this happen. I
think we have the tools and all the pieces to do this, so it's a matter of
having the right people that want to make this possible.

Thanks

Carlos


2018-06-29 10:12 GMT+02:00 Harbs :

> There is something I’ve been struggling with:
>
> AS3 does not have “typed” arrays. The closest it has is Vectors. The
> problem with vectors is two-fold. First of all, the cross compiler uses
> Language to construct the vector rather than simply declaring an array.
> This could probably be fixed though. The second problem is that it’s
> awkward converting between arrays and vectors. This is especially
> problematic when you want to “cast” an array retrieved from say JSON to a
> typed Vector. It’s also a problem if you want to use Array features such as
> map and the like.
>
> I’m not sure what the right solution to improving this would be. Expand
> Vector to allow arrays and Vectors to be cast as each other? Create a new
> “array type" declaration (i.e. var arr:String[] = [“foo”,”baz”];)?
> Something else?
>
> Thoughts?
> Harbs
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Migrating Enterprise Flex Application

2018-06-29 Thread chembali
The name of the mxml file is PopupTemplate.mxml. I have attached the 
ResizableTitleWindow.as

  



--
Sent from: http://apache-royale-development.20373.n8.nabble.com/


Arrays and types

2018-06-29 Thread Harbs
There is something I’ve been struggling with:

AS3 does not have “typed” arrays. The closest it has is Vectors. The problem 
with vectors is two-fold. First of all, the cross compiler uses Language to 
construct the vector rather than simply declaring an array. This could probably 
be fixed though. The second problem is that it’s awkward converting between 
arrays and vectors. This is especially problematic when you want to “cast” an 
array retrieved from say JSON to a typed Vector. It’s also a problem if you 
want to use Array features such as map and the like.

I’m not sure what the right solution to improving this would be. Expand Vector 
to allow arrays and Vectors to be cast as each other? Create a new “array type" 
declaration (i.e. var arr:String[] = [“foo”,”baz”];)? Something else?

Thoughts?
Harbs



Re: Migrating Enterprise Flex Application

2018-06-29 Thread Alex Harui
Interesting.  What is the name of this MXML file?  What does 
ResizableTitleWindow.as look like?  Is ResizableTitleWindow.as in the same swc 
as this MXML file?

For the purposes of generating the API report, you can probably skip this 
entire file.  It appears to only be using VBox from Flex.

HTH,
-Alex

On 6/29/18, 12:03 AM, "chembali"  wrote:

I stripped it down to 





But no luck. I tried changing the name space as well, but didn't work.
ResizableTitleWindow.as compiles fine. Thinking of replacing this panel with
some other kind of panel and see if I can move along.



--
Sent from: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F=02%7C01%7Caharui%40adobe.com%7C9d223aa8ded54dacd99f08d5dd8e6195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658525950589485=%2FbC%2B36hgFsCI5VmEuHDJ8Qthsi3KM8JpmNqnVn0s208%3D=0




RE: Migrating Enterprise Flex Application

2018-06-29 Thread chembali
I stripped it down to 





But no luck. I tried changing the name space as well, but didn't work.
ResizableTitleWindow.as compiles fine. Thinking of replacing this panel with
some other kind of panel and see if I can move along.



--
Sent from: http://apache-royale-development.20373.n8.nabble.com/