Re: BinaryData and odd bytes

2018-06-24 Thread Harbs
I edited my test case to use a single DataView and to take the buffer in the 
UInt16Array constructor. I think it did help, but those methods are still much 
slower.

> On Jun 24, 2018, at 4:46 AM, Greg Dove  wrote:
> 
> I think DataView might be a lot faster than it was a couple of years ago.
> At least it seems to be (on Chrome/windows on the machine I am currently
> using) (and it should only need a single instance like the Uint8Array, for
> the current buffer, I think, instead of 'new DataView' )
> 
> On Sun, Jun 24, 2018 at 1:19 PM Greg Dove  wrote:
> 
>> 
>> I tried to add in the extra test, but messed up I think because it did not
>> copy over the original tests in the revision (even though I was 'adding' a
>> new test). I have not used jsperf before, so probably did something stupid.
>> On the face of it, it certainly does look like the byte level stuff is
>> faster.
>> 
>> 
>> On Sun, Jun 24, 2018 at 10:32 AM Greg Dove  wrote:
>> 
>>> 
>>> Harbs, for the typed array test, try using the ArrayBuffer in the
>>> constructor instead of the Uint8Array, I think you might see a difference
>>> here.
>>> 
>>> 
>>> On Sun, Jun 24, 2018 at 10:09 AM Harbs  wrote:
>>> 
>>>> I created a jsperf which compares different read methods, and the one I
>>>> changed it to seems fastest by far:
>>>> https://jsperf.com/typedarray-read-performance/1 <
>>>> https://jsperf.com/typedarray-read-performance/1>
>>>> 
>>>> The only optimization which might give slight gains is to use shift
>>>> operators instead of multiplication. Enabling the --enable-benchmarking
>>>> flag in Chrome seemed to indicate that there’s up to a 10% performance
>>>> increase of the shift operators over multiplication. Logically, shift
>>>> operators should be cheaper. In Safari, the shift operator gave a
>>>> performance boost of 3 times the multiplication.
>>>> 
>>>> I only tested 16 bit uints. It might be worthwhile adding ints and 32
>>>> bit.
>>>> 
>>>> Thanks,
>>>> Harbs
>>>> 
>>>>> On Jun 22, 2018, at 8:58 AM, Alex Harui 
>>>> wrote:
>>>>> 
>>>>> It is definitely true that I don't know how expensive instantiation of
>>>> small instances is in the browser.  Might even be different in different
>>>> browsers.  There should also be function call overhead in calling the
>>>> constructor as well.  On the other hand, maybe using the typed arrays helps
>>>> with the browser's type inferencing and there is some advantage there that
>>>> also assumes the equivalent of word/long alignments.
>>>>> 
>>>>> If TypeArrays really aren't that expensive to instantiate, it may be
>>>> that the way to handle floats/doubles is to copy bytes into a new
>>>> BinaryData and convert that to the appropriate TypedArray.  That should
>>>> ensure that there won't be alignment issues.
>>>>> 
>>>>> IMO, this discussion shows the importance of providing choices.  You
>>>> can have a much simpler variant that assumes certain endian and thus save a
>>>> whole bunch of byte swapping.  You might in fact have a faster
>>>> implementation if you can guarantee/assume alignment.
>>>>> 
>>>>> HTH,
>>>>> -Alex
>>>>> 
>>>>> On 6/21/18, 3:01 PM, "Greg Dove"  wrote:
>>>>> 
>>>>>   ' If you have the time to resolve these remaining issues, that
>>>> would be
>>>>>   awesome.'
>>>>> 
>>>>>   Happy to commit to doing this by mid-July if that works. I do have
>>>> downtime
>>>>>   in July that I can use for Royale, but I also need to set up for
>>>> Royale
>>>>>   development again because I have changed machines.
>>>>> 
>>>>> 
>>>>>   On Fri, Jun 22, 2018 at 9:13 AM Harbs 
>>>> wrote:
>>>>> 
>>>>>> Cool.
>>>>>> 
>>>>>> FYI there are still some issues to resolve:
>>>>>> 
>>>>>> 1. readFloat and readDouble should have the same issues as the
>>>> various int
>>>>>> read methods. I did not fix that yet because calculating floats and
>>>> doubles
>>>>>> is harder than ints. I’m not sure of the best way to handle that. One
>>&g

Re: BinaryData and odd bytes

2018-06-24 Thread Harbs

> On Jun 25, 2018, at 12:24 AM, Greg Dove  wrote:
> 
> I don't expect things to change I guess, but it would theoretically be
> better testing with the compiled version of BinaryData. Things like the
> function call overhead from getTypedArray() vs. referencing something
> directly and the repeated_position++ versus one _position op to increment
> (e.g. for DataView) in some cases mean there is more work at the byte
> level. But I don't expect this to change things based on these tests.

I had the same thoughts, and I’d be interested in seeing more test results.

I briefly attempted using the code here 
https://github.com/jDataView/jDataView/blob/master/src/jdataview.js 
<https://github.com/jDataView/jDataView/blob/master/src/jdataview.js> for 
floats and doubles, but I had some trouble getting correct results. I someone 
has the time to add tests for different methods for floating point numbers, 
that should be a useful exercise.

> Maybe I can troubleshoot the MD5 thing in the coming weeks. One of the
> other things I wondered about for BinaryData is whether it should have it's
> own 'autogrow' strategy internally for the buffer with sequential writes.
> This is not really PAYG though, so I guess not. It definitely performs much
> better on writing with a preallocated buffer length, so maybe that is the
> recommended approach for users.

I had similar thoughts, but the length setter could easily be used to pre-set 
the size for consecutive writes. This should give users the ability to 
implement relatively cheap writes. Possibly the most efficient way would be to 
instantiate an BinaryData with an ArrayBuffer of a set size.

Thanks,
Harbs

MD5 [was: Re: BinaryData and odd bytes]

2018-06-21 Thread Harbs
I forgot. The ported MD5 code did not work. I just replaced it with an MIT JS 
implementation…

> On Jun 21, 2018, at 1:20 AM, Harbs  wrote:
> 
> FYI, the MD5 test there now fails. I have no idea why. Maybe I messed 
> something up with my BinaryData changes, but I can’t see what…



Re: BinaryData and odd bytes

2018-06-21 Thread Harbs
I just added a unit test for this.

The test will fail with a RTE using the old implementation.

Explanation: After reading the first byte, the position is 1 which doesn’t 
align with a 16IntArray.

Thanks,
Harbs

> On Jun 21, 2018, at 1:48 AM, Greg Dove  wrote:
> 
> I am not sure what the int16/int-aligned issue is yet (I have not read back
> through all the relevant history) but if we can set up a unit test for it,
> this stuff all becomes much clearer I think.



Re: BinaryData and odd bytes

2018-06-20 Thread Harbs
I remembered there were tests, but I forgot where. Thanks for that. I’ll try to 
ad a test for this...

FYI, the MD5 test there now fails. I have no idea why. Maybe I messed something 
up with my BinaryData changes, but I can’t see what…

> On Jun 21, 2018, at 12:45 AM, Greg Dove  wrote:
> 
> Hi guys, some quick comments...
> I do recall this being difficult to get a good balance of performance
> whilst getting close to the ByteArray api.
> I did do a reasonable amount of performance tests across multiple browsers,
> trying multiple approaches and I ended up choosing an implementation that
> favored performance in Chrome (as most 'popular' browser) and was not
> always the best, but was certainly not the worst in other browsers. I did
> focus on speed and not memory though.
> iirc the browser results were still slower than flash Bytearray native
> performance on the same machine, but were still much faster than the
> original method that was used before I made the original changes.
> 
> Harbs, there is a very comprehensive set of unit tests for BinaryData. I
> have not looked at what the issue is that you are currently addressing, but
> they obviously did not include that - it would be good to add it to them if
> possible. They were part of the flexunit testing on the flash side, but you
> would need to use that manual unit testing setup that is in that manual
> unit testing demo project (that you got working after we discussed at one
> point) to assess your changes to the js implementation. At the very least,
> right now, this should help to verify that all the methods that were
> changed still give the correct results for a range of normal and edge cases.
> 
> Alex, the typed array instantiation issue is valid on looking at the code,
> but with all the optimizations in the js engines it is difficult to know
> whether things like this are actually 'real' in terms of impact in actual
> use because the engines are so smart at optimizing things at runtime. As I
> said, I did try multiple approaches, and I am sure I did not consider all
> options, but I certainly did have performance 'front and center' when I
> worked on this, so spent a bunch of time looking at it.  But probably large
> loop tests of the same method (which I was doing for performance tests) are
> also not representative of general use (and therefore perhaps the same
> could apply to any 'runtime optimizations' by the engines if that is
> happening).
> 
> 
> On Thu, Jun 21, 2018 at 4:17 AM Harbs  wrote:
> 
>> I expect the same.
>> 
>> Harbs
>> 
>>> On Jun 20, 2018, at 7:01 PM, Alex Harui 
>> wrote:
>>> 
>>> FWIW, I would expect that to be faster than creating new Typed Arrays on
>> each read.  The Garbage Collection implications of an instantiation on each
>> read made me cringe.
>>> 
>>> My 2 cents,
>>> -Alex
>>> 
>>> On 6/20/18, 1:31 AM, "Harbs" > harbs.li...@gmail.com>> wrote:
>>> 
>>>   I ended up rewriting the read methods to use simple math and shift
>> operators. It reads bytes directly from the existing Uint8Array and uses
>> shift operators to convert unsigned ints to signed ones. Over-all the new
>> methods should be more robust and more efficient.
>>> 
>>>   There is likely still issues with the float read methods and all
>> multi-byte write methods.
>>> 
>>>   Harbs
>>> 
>>>> On Jun 19, 2018, at 9:28 PM, Harbs  wrote:
>>>> 
>>>> DataView works in IE10+. The problem with DataView as that it’s slow.
>>>> 
>>>>> On Jun 19, 2018, at 9:24 PM, Carlos Rovira 
>> wrote:
>>>>> 
>>>>> Hi Harbs,
>>>>> 
>>>>> for me any improvement seems ok, just ensure it works in all browsers
>>>>> (specially IE11)
>>>>> 
>>>>> thanks
>>>>> 
>>>>> 2018-06-19 19:25 GMT+02:00 Alex Harui :
>>>>> 
>>>>>> Isn't ByteArray mapped to UInt8Array?
>>>>>> 
>>>>>> On 6/19/18, 10:07 AM, "Harbs"  wrote:
>>>>>> 
>>>>>> BinaryData uses TypedArrays to read data. It seems that if the
>>>>>> ArrayBuffer does not divide evenly into the target TypedArray, you
>> get a
>>>>>> runtime error.
>>>>>> 
>>>>>> For example:
>>>>>> 
>>>>>> readShort() works like this:
>>>>>> var ret:int = new Int16Array(ba, _position, 1)[0];
>>>>>> 
>>>>>> If _position is not divisible by 2 (

Re: BinaryData and odd bytes

2018-06-20 Thread Harbs
I expect the same.

Harbs

> On Jun 20, 2018, at 7:01 PM, Alex Harui  wrote:
> 
> FWIW, I would expect that to be faster than creating new Typed Arrays on each 
> read.  The Garbage Collection implications of an instantiation on each read 
> made me cringe.
> 
> My 2 cents,
> -Alex
> 
> On 6/20/18, 1:31 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>I ended up rewriting the read methods to use simple math and shift 
> operators. It reads bytes directly from the existing Uint8Array and uses 
> shift operators to convert unsigned ints to signed ones. Over-all the new 
> methods should be more robust and more efficient.
> 
>There is likely still issues with the float read methods and all 
> multi-byte write methods.
> 
>Harbs
> 
>> On Jun 19, 2018, at 9:28 PM, Harbs  wrote:
>> 
>> DataView works in IE10+. The problem with DataView as that it’s slow.
>> 
>>> On Jun 19, 2018, at 9:24 PM, Carlos Rovira  wrote:
>>> 
>>> Hi Harbs,
>>> 
>>> for me any improvement seems ok, just ensure it works in all browsers
>>> (specially IE11)
>>> 
>>> thanks
>>> 
>>> 2018-06-19 19:25 GMT+02:00 Alex Harui :
>>> 
>>>> Isn't ByteArray mapped to UInt8Array?
>>>> 
>>>> On 6/19/18, 10:07 AM, "Harbs"  wrote:
>>>> 
>>>>  BinaryData uses TypedArrays to read data. It seems that if the
>>>> ArrayBuffer does not divide evenly into the target TypedArray, you get a
>>>> runtime error.
>>>> 
>>>>  For example:
>>>> 
>>>>  readShort() works like this:
>>>>  var ret:int = new Int16Array(ba, _position, 1)[0];
>>>> 
>>>>  If _position is not divisible by 2 (i.e. an odd number), this causes a
>>>> RTE.
>>>> 
>>>>  readInt() has a similar problem that _position needs to be divisible
>>>> by 4, etc.
>>>> 
>>>>  Am I correct that Flash’s ByteArray works correctly in this situation?
>>>> We can use DataViews to solve the problem or we can read the bytes 
>>>> directly.
>>>> 
>>>>  Thanks,
>>>>  Harbs
>>>> 
>>>> 
>>> 
>>> 
>>> -- 
>>> Carlos Rovira
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7C0a39e02d45a94743801a08d5d688429c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636650803077295693=po2u0k2cYHf2yvcfuYaN8VzEoF9pAzcV6YEPaS%2Be8G0%3D=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7C0a39e02d45a94743801a08d5d688429c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636650803077295693=po2u0k2cYHf2yvcfuYaN8VzEoF9pAzcV6YEPaS%2Be8G0%3D=0>


Re: Migrating Enterprise Flex Application

2018-06-20 Thread Harbs
The initial work will be getting the application to compile and removing 
compile errors. That’s work which can easily be divided if you have developers 
to help you.

Once you get the basics to compile, you will have a much better idea of what 
work is ahead of you.

Good luck!
Harbs

> On Jun 20, 2018, at 6:39 AM, chembali  wrote:
> 
> Thank you for the responses from all of you. I feel confident to take this
> challenge up. My struggle will be to come up a detailed project plan with
> clear milestones and deliverables to keep the stakeholders convinced and
> happy.
> 
> Thank you
> Sajith 
> 
> 
> 
> --
> Sent from: http://apache-royale-development.20373.n8.nabble.com/



Re: BinaryData and odd bytes

2018-06-20 Thread Harbs
I ended up rewriting the read methods to use simple math and shift operators. 
It reads bytes directly from the existing Uint8Array and uses shift operators 
to convert unsigned ints to signed ones. Over-all the new methods should be 
more robust and more efficient.

There is likely still issues with the float read methods and all multi-byte 
write methods.

Harbs

> On Jun 19, 2018, at 9:28 PM, Harbs  wrote:
> 
> DataView works in IE10+. The problem with DataView as that it’s slow.
> 
>> On Jun 19, 2018, at 9:24 PM, Carlos Rovira  wrote:
>> 
>> Hi Harbs,
>> 
>> for me any improvement seems ok, just ensure it works in all browsers
>> (specially IE11)
>> 
>> thanks
>> 
>> 2018-06-19 19:25 GMT+02:00 Alex Harui :
>> 
>>> Isn't ByteArray mapped to UInt8Array?
>>> 
>>> On 6/19/18, 10:07 AM, "Harbs"  wrote:
>>> 
>>>   BinaryData uses TypedArrays to read data. It seems that if the
>>> ArrayBuffer does not divide evenly into the target TypedArray, you get a
>>> runtime error.
>>> 
>>>   For example:
>>> 
>>>   readShort() works like this:
>>>   var ret:int = new Int16Array(ba, _position, 1)[0];
>>> 
>>>   If _position is not divisible by 2 (i.e. an odd number), this causes a
>>> RTE.
>>> 
>>>   readInt() has a similar problem that _position needs to be divisible
>>> by 4, etc.
>>> 
>>>   Am I correct that Flash’s ByteArray works correctly in this situation?
>>> We can use DataViews to solve the problem or we can read the bytes directly.
>>> 
>>>   Thanks,
>>>   Harbs
>>> 
>>> 
>> 
>> 
>> -- 
>> Carlos Rovira
>> http://about.me/carlosrovira
> 



Re: Null pointer errors

2018-05-01 Thread Harbs
Yeah. I was planning on spending time on the compiler, but time has not been 
recently as forthcoming as I was hoping… ;-)

FWIW, my daughter is finishing school soon and I’m going to have her try and 
learn the compiler. I’ll see how that goes…

Harbs

> On May 1, 2018, at 7:53 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Sorry,  I thought the link was to the source so I didn't click on it.
> 
> This could be a good exercise for anyone wanting to learn more about the 
> compiler to figure out how to catch this situation (maybe by detecting the 
> AST for "void 0") and outputting an error instead of an NPE, or swapping in 
> "undefined".
> 
> -Alex
> 
> On 5/1/18, 9:35 AM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>I attached a paste of the stack in my email.
> 
>I just finished resolving all my errors. It was hard to trace them down, 
> but I just discovered that there were uses of "void 0" in the code. I 
> replaced all those cases with “undefined" and poof! All my errors went away! 
> :-)
> 
>My theory is that use of void 0 was confusing the compiler and causing 
> errors elsewhere… I’m not sure how to demonstrate this…
> 
>Harbs
> 
>(P.S. Sorry I’ve been so quiet lately. Life has been pretty busy… ;) )
> 
>> On May 1, 2018, at 7:03 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>> 
>> What is the call stack for the null pointer?
>> 
>> On 5/1/18, 5:05 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>> 
>>   I’m trying to compile a library using comic and I’m getting a **LOT** of 
>> null pointer errors. They seem to be related to missing type information, 
>> although I’m not completely sure why the missing type information is causing 
>> these errors.
>> 
>>   Some of the errors are resolved-able by adding type info, but not all.
>> 
>>   I picked one at random to track down the issue:
>>   
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D=0>
>> 
>>   The line in question looks like this:
>>   var codepoint:int = glyphs[i].codePoints[0];
>> 
>>   glyphs[I] is a “GlyphInfo” instance. Either of the following two changes 
>> make this particular error go away:
>>   var codepoint:* = glyphs[i].codePoints[0];
>>   var codepoint:int = (glyphs[i] as GlyphInfo).codePoints[0];
>> 
>>   I’m not really sure why these changes are necessary though…
>> 
>>   Thoughts?
>>   Harbs
>> 
> 
> 
> 



Re: Null pointer errors

2018-05-02 Thread Harbs
] at 
org.apache.royale.compiler.clients.COMPJSCRoyale.compile(COMPJSCRoyale.java:308)
 [java] at 
org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:240)
 [java] at 
org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:197)
 [java] at 
org.apache.royale.compiler.clients.COMPJSC._mainNoExit(COMPJSC.java:210)
 [java] at 
org.apache.royale.compiler.clients.COMPJSC.mainNoExit(COMPJSC.java:140)
 [java] at 
org.apache.royale.compiler.clients.COMPJSC.staticMainNoExit(COMPJSC.java:125)
 [java] at 
org.apache.royale.compiler.clients.COMPJSC.main(COMPJSC.java:108)

this._font is typed to a class instance
getTable() returns an Object type.

Changing the code to the following makes the error go away:

var glyfPos:int = 
(this._font.getTable('loca').offsets[this.id] as int);
var nextPos:int = 
(this._font.getTable('loca').offsets[this.id + 1] as int);

Harbs

> On May 1, 2018, at 7:35 PM, Harbs <harbs.li...@gmail.com> wrote:
> 
> I just finished resolving all my errors. It was hard to trace them down, but 
> I just discovered that there were uses of "void 0" in the code. I replaced 
> all those cases with “undefined" and poof! All my errors went away! :-)



Re: Null pointer errors

2018-05-02 Thread Harbs
Well, with font parsing there are SOOO MANY different data structures that it’s 
almost impossible to avoid using Object. Even if it was possible (which I’m not 
sure of), it’ll probably take me weeks or months and countless classes (with 
all the memory penalties of doing so) to cover all the types.

I’m going to try and add a compiler option to output bracket notation for 
Object types to deal with the renaming issue of using Objects.

Harbs

> On May 2, 2018, at 9:36 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Hmm.  That's what you get for using Object __
> 
> The code expects the expression for the initial value to resolve to a 
> definition (so we know if we need to coerce it), but once you switch to 
> Object, it won't resolve.  In this case,we don't know the type of "offsets".  
>  The quick fix is to just accept that it might not resolve and just let the 
> browser deal with it.  However, we don't know what the Google Closure 
> optimizer will do with the "offsets" property.  It may or may not rename it.  
> I keep thinking we should be warning when folks use Object.  In Royale you 
> are asking for optimizer trouble if you are not completely strongly-typed.
> 
> Thoughts?
> -Alex
> 
> On 5/1/18, 11:19 PM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>FYI, I just tried reverting some changes, and it seems that not all the 
> errors were due to void 0:
>This code:
>   var glyfPos:int = 
> this._font.getTable('loca').offsets[this.id];
>   var nextPos:int = 
> this._font.getTable('loca').offsets[this.id + 1];
> 
>Causes this error:
> 
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.jx.VarDeclarationEmitter.emit(VarDeclarationEmitter.java:153)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitVarDeclaration(JSRoyaleEmitter.java:699)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitVariable(ASBlockWalker.java:278)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:162)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:159)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:349)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:278)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:159)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASEmitter.emitMethodScope(ASEmitter.java:867)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.jx.MethodEmitter.emit(MethodEmitter.java:145)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitMethod(JSRoyaleEmitter.java:723)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.jx.ClassEmitter.emit(ClassEmitter.java:176)
> [java]at 
> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitClass(JSRoyaleEmitter.java:681)
> [java]at 
> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitClass(ASBlockWalker.java:256)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:136)
> [java]at 
> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)

Re: Null pointer errors

2018-05-02 Thread Harbs
Nope. They are data structures that are constructed from binary data. They are 
also generally lazily initialized (which makes a huge difference in performance 
and memory footprint). Basically, there are tens of tables which might, or 
might not exist in any given font. The tables might or might not have different 
pieces of information to describe features and functionality.

It took my a couple of weeks just to wrap my head around all this stuff… ;-)

It’s using this set of classes (also migrated to AS3):
https://github.com/devongovett/restructure 
<https://github.com/devongovett/restructure>

There are 148 instances of Struct alone. Almost every one has a different set 
of variables. That does not even include VersionedStruct, Array structs, Number 
structs, LazyArray, etc.

Maybe there’s a way to infer types, but I don’t see how. Many of the variables 
can have different types depending on the context too. (Sometimes they can even 
be functions.)

Harbs

> On May 2, 2018, at 10:16 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Are the objects JSON objects?  We have a utility that tries to convert JSON 
> to AS3 ValueObjects by guessing the data types.
> 
> If the objects are externally instantiated, then you only really need 
> typedefs and can avoid the memory overhead of the definitions.
> 
> -Alex
> 
> On 5/1/18, 11:40 PM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>Well, with font parsing there are SOOO MANY different data structures that 
> it’s almost impossible to avoid using Object. Even if it was possible (which 
> I’m not sure of), it’ll probably take me weeks or months and countless 
> classes (with all the memory penalties of doing so) to cover all the types.
> 
>I’m going to try and add a compiler option to output bracket notation for 
> Object types to deal with the renaming issue of using Objects.
> 
>Harbs
> 
>> On May 2, 2018, at 9:36 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>> 
>> Hmm.  That's what you get for using Object __
>> 
>> The code expects the expression for the initial value to resolve to a 
>> definition (so we know if we need to coerce it), but once you switch to 
>> Object, it won't resolve.  In this case,we don't know the type of "offsets". 
>>   The quick fix is to just accept that it might not resolve and just let the 
>> browser deal with it.  However, we don't know what the Google Closure 
>> optimizer will do with the "offsets" property.  It may or may not rename it. 
>>  I keep thinking we should be warning when folks use Object.  In Royale you 
>> are asking for optimizer trouble if you are not completely strongly-typed.
>> 
>> Thoughts?
>> -Alex
>> 
>> On 5/1/18, 11:19 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>> 
>>   FYI, I just tried reverting some changes, and it seems that not all the 
>> errors were due to void 0:
>>   This code:
>>  var glyfPos:int = 
>> this._font.getTable('loca').offsets[this.id];
>>  var nextPos:int = 
>> this._font.getTable('loca').offsets[this.id + 1];
>> 
>>   Causes this error:
>> 
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.jx.VarDeclarationEmitter.emit(VarDeclarationEmitter.java:153)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitVarDeclaration(JSRoyaleEmitter.java:699)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.visitVariable(ASBlockWalker.java:278)
>>[java]at 
>> org.apache.royale.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:162)
>>[java]at 
>> org.apache.royale.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)
>>[java]at 
>> org.apache.royale.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:159)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:323)
>>[java]at 
>> org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter.emitStatement(JSRoyaleEmitter.java:987)
>>[java]at 
>

Re: Royale CLI issues

2018-05-02 Thread Harbs
The bin folder is created by the compiler while compiling the app. I have not 
been following this discussion very closely. What are you using to compile?

> On May 2, 2018, at 9:48 AM, Dany Dhondt  wrote:
> 
> Hi Om,
> 
> I tried both ways, none of them works.
> Error: ENOENT: no such file or directory, open '/Volumes/Macintosh 
> HD/Documents/ARCHEMEDIA/ROYALE/my-royale-app/bin/js-debug/index.html'
>
> 
> 
> My question is: shouldn't the 'new' command create more than just one mxml 
> file?
> What script is responsible for creating the bin folder? Should it be the 
> 'new' script or the 'serve' script?
> 
> -Dany
> 
> 
> Op 2 mei 2018 om 08:36 uur uur schreef OmPrakash Muppirala 
> :
> 
>> On Tue, May 1, 2018 at 11:15 PM, Dany Dhondt  wrote:
>> 
>>> Alex,
>>> 
>>> The version number here came from package.json so it should have been
>>> updated by someone.
>>> 
>>> I reinstalled from the link you provided with no problem.
>>> But running the royale server:debug [1] command gives me the same errors
>>> as before.
>>> 
>>> I noticed that when running: royale new my-royale-app, only an app folder
>>> is created with a src folder in it.In this src folder, there is a main.mxml
>>> file. So no other files or folders whatsoever are created by the 'new'
>>> command.
>>> 
>> 
>> Yes, that is the expected behavior. Currently, we ship a very simple
>> `Hello World` app with the royale-cli tool. We can make it fancier app
>> once we iron out all the issues.
>> 
>> 
>>> 
>>> This explains the error:
>>> 
>>> Error: ENOENT: no such file or directory, open '/Volumes/Macintosh
>>> HD/Documents/ARCHEMEDIA/ROYALE/my-royale-app/src/bin/js-debug/index.html'
>>> 
>>> 
>> Hmm, the path does not seem correct. it should be
>> .../my-royale-app/bin/js-debug/index.html instead of what is shown here.
>> 
>> It appears that you are running the royale serve:debug command from the
>> .../my-royale-app/src directory instead of from the .../my-royale-app
>> directory.
>> 
>> Thanks,
>> Om
>> 
>> 
>>> -Dany
>>> 
>>> [1] https://github.com/apache/royale-asjs/tree/develop/npm/cli 
>>> 
>>> Op 2 mei 2018 om 05:13 uur uur schreef Alex Harui >> >:
>>> 
>>> That's my windows machine that I used for 0.9.2.
>>> 
>>> Where did it say 0.9.3? I'm trying to remember if I published the package
>>> to NPM or if you did. Maybe the scripts are running or were run after some
>>> versions got updated in the repos. I have not run a build on my windows
>>> machine since the release.
>>> 
>>> -Alex
>>> 
>>> On 5/1/18, 2:14 PM, "omup...@gmail.com on behalf of OmPrakash Muppirala" <
>>> omup...@gmail.com  on behalf of 
>>> bigosma...@gmail.com > wrote:
>>> 
>>> On Tue, May 1, 2018 at 1:36 PM, Alex Harui 
>>> wrote:
>>> 
>>> > Om,
>>> >
>>> > I got the warnings when we released 0.9.2 but it appeared to leave a
>>> > functional SDK. Now it is hanging for me and Dany.
>>> >
>>> > I don't think I've run a publish and I don't think the CI server is
>>> > either, but you never know. Try grabbing one of the SWCs. Unzip it and
>>> > swfdump the library.swf. There should be debugfile bytecodes with paths
>>> to
>>> > the source that give us a clue.
>>> >
>>> >
>>> Good idea. Here is what I see in swfdump:
>>> 
>>> 2) + 0:1 debugfile
>>> "C:\temp\rc\royale-asjs\frameworks\projects\Collections\src\main\royale;
>>> org\apache\royale\collections;FlattenedList.as"
>>> 
>>> Any idea whose machine this could have been?
>>> 
>>> Thanks,
>>> Om
>>> 
>>> 
>>> > -Alex
>>> >
>>> > On 5/1/18, 10:49 AM, "omup...@gmail.com on behalf of OmPrakash
>>> > Muppirala" >> > > wrote:
>>> >
>>> > On Tue, May 1, 2018 at 8:57 AM, Alex Harui 
>>> > wrote:
>>> >
>>> > > Hi Dany,
>>> > >
>>> > > The link is directly to a tar.gz built by our CI server. No humans
>>> > > involved, and no special packaging for NPM. NPM says it can install
>>> > any
>>> > > tar.gz file. Try downloading the file at that link and using Mac
>>> > Finder to
>>> > > expand it into a folder. For me it expands without errors. This is
>>> > why I
>>> > > believe it is some incompatibility with NPM.
>>> > >
>>> > > If the tar.gz expands for you on Mac, you can try to "npm install"
>>> > the
>>> > > folder. Running:
>>> > >
>>> > > sudo npm install -g 
>>> > >
>>> > > seemed to work for me.
>>> > >
>>> > > -Alex
>>> > >
>>> >
>>> > I just tried
>>> > npm install @apache-royale/royale-js -g
>>> > on windwos and it installed just fine.
>>> >
>>> > Although, I notice that @apache-royale/royale-js@0.9.3 was
>>> > installed. It
>>> > should have installed 0.9.2. Did we publish 0.9.3 to npm by mistake?
>>> > Could that be related?
>>> >
>>> > Thanks,
>>> > Om
>>> >
>>> >
>>> > >
>>> > > On 

Newest little Harbs (was Re: Null pointer errors)

2018-05-02 Thread Harbs
Well, how about a baby sister? ;-)

We just had a baby girl about a half hour ago. :-)

(I’ll post a picture as soon as I take one.)

Harbs

> On May 1, 2018, at 11:33 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> I can think of better graduation gifts than the chance to learn the compiler 
> code __.



Re: Null pointer errors

2018-05-02 Thread Harbs
Here’s a fun one:

var MinMax:Struct = new Struct({
minCoord:   new Pointer(r.uint16, BaseCoord),  // May be NULL
maxCoord:   new Pointer(r.uint16, BaseCoord),  // May be NULL
featMinMaxCount:r.uint16,// May be 0
featMinMaxRecords:  new ArrayStruct(FeatMinMaxRecord, 'featMinMaxCount') // 
In alphabetical order
});

This struct is then used in another and so on:

var BaseLangSysRecord:Struct = new Struct({
tag:new StringStruct(4),  // 4-byte language system identification tag
minMax: new Pointer(r.uint16, MinMax, {type: 'parent'})
});

I believe one of the primary features of these classes is that they support 
lazy initialization and the structures can be evaluated as needed.

Harbs

> On May 2, 2018, at 6:36 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> What do some of the actual structs look like?  The Restructure 
> library/language looks like an attempt to strongly-type data structures.  
> I've been told that type-inferencing is a key part to performance in JS in 
> the browser.  But as we look into the future at other output types, 
> statically knowing types looks like it will be really important.
> 
> Having a way to output bracket notation might be a bunch of work, and you 
> might be surprised by the results.  Every time you use an Array, the accessor 
> is returning an Object, not whatever type you know is in there.
> 
> HTH,
> -Alex
> 
> On 5/2/18, 12:29 AM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>Nope. They are data structures that are constructed from binary data. They 
> are also generally lazily initialized (which makes a huge difference in 
> performance and memory footprint). Basically, there are tens of tables which 
> might, or might not exist in any given font. The tables might or might not 
> have different pieces of information to describe features and functionality.
> 
>It took my a couple of weeks just to wrap my head around all this stuff… 
> ;-)
> 
>It’s using this set of classes (also migrated to AS3):
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdevongovett%2Frestructure=02%7C01%7Caharui%40adobe.com%7C0dba99c3f32b410a1fd608d5affe6efd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636608429687243487=%2Bn6rP8sRodUlqLqLlcia%2FWwQMAvBYpYDmlU%2BNE4YGDk%3D=0
>  
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdevongovett%2Frestructure=02%7C01%7Caharui%40adobe.com%7C0dba99c3f32b410a1fd608d5affe6efd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636608429687243487=%2Bn6rP8sRodUlqLqLlcia%2FWwQMAvBYpYDmlU%2BNE4YGDk%3D=0>
> 
>There are 148 instances of Struct alone. Almost every one has a different 
> set of variables. That does not even include VersionedStruct, Array structs, 
> Number structs, LazyArray, etc.
> 
>Maybe there’s a way to infer types, but I don’t see how. Many of the 
> variables can have different types depending on the context too. (Sometimes 
> they can even be functions.)
> 
>Harbs
> 
>> On May 2, 2018, at 10:16 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>> 
>> Are the objects JSON objects?  We have a utility that tries to convert JSON 
>> to AS3 ValueObjects by guessing the data types.
>> 
>> If the objects are externally instantiated, then you only really need 
>> typedefs and can avoid the memory overhead of the definitions.
>> 
>> -Alex
>> 
>> On 5/1/18, 11:40 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>> 
>>   Well, with font parsing there are SOOO MANY different data structures that 
>> it’s almost impossible to avoid using Object. Even if it was possible (which 
>> I’m not sure of), it’ll probably take me weeks or months and countless 
>> classes (with all the memory penalties of doing so) to cover all the types.
>> 
>>   I’m going to try and add a compiler option to output bracket notation for 
>> Object types to deal with the renaming issue of using Objects.
>> 
>>   Harbs
>> 
>>> On May 2, 2018, at 9:36 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>>> 
>>> Hmm.  That's what you get for using Object __
>>> 
>>> The code expects the expression for the initial value to resolve to a 
>>> definition (so we know if we need to coerce it), but once you switch to 
>>> Object, it won't resolve.  In this case,we don't know the type of 
>>> "offsets".   The quick fix is to just accept that it might not resolve and 
>>> just let the browser deal with it.  However, we don't know what the Google 
>>> Closure optimizer will do with the "offsets" property

Re: Null pointer errors

2018-05-01 Thread Harbs
I attached a paste of the stack in my email.

I just finished resolving all my errors. It was hard to trace them down, but I 
just discovered that there were uses of "void 0" in the code. I replaced all 
those cases with “undefined" and poof! All my errors went away! :-)

My theory is that use of void 0 was confusing the compiler and causing errors 
elsewhere… I’m not sure how to demonstrate this…

Harbs

(P.S. Sorry I’ve been so quiet lately. Life has been pretty busy… ;) )

> On May 1, 2018, at 7:03 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> What is the call stack for the null pointer?
> 
> On 5/1/18, 5:05 AM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>I’m trying to compile a library using comic and I’m getting a **LOT** of 
> null pointer errors. They seem to be related to missing type information, 
> although I’m not completely sure why the missing type information is causing 
> these errors.
> 
>Some of the errors are resolved-able by adding type info, but not all.
> 
>I picked one at random to track down the issue:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D=0
>  
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F8pLB=02%7C01%7Caharui%40adobe.com%7C31fb16c8d65948a50da008d5af5bd2c6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607731304191116=ik%2FnmWaooQD%2BwLT6VM1JN1ypa4BdOXe8VS1NfyF5FUw%3D=0>
> 
>The line in question looks like this:
>var codepoint:int = glyphs[i].codePoints[0];
> 
>glyphs[I] is a “GlyphInfo” instance. Either of the following two changes 
> make this particular error go away:
>var codepoint:* = glyphs[i].codePoints[0];
>var codepoint:int = (glyphs[i] as GlyphInfo).codePoints[0];
> 
>I’m not really sure why these changes are necessary though…
> 
>Thoughts?
>Harbs
> 



Re: Newest little Harbs (was Re: Null pointer errors)

2018-05-03 Thread Harbs
Funny, but you weren’t very far off… ;-)

We named our daughter Malka which is Hebrew for queen. (No, it was not because 
of Royale. I might be a geek but my wife definitely is not. ;-p She was named 
after a grandmother.) So she does in fact have a “Royale” name…

:-)

Harbs

> On May 2, 2018, at 6:50 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Whatever you do, do not name her "Royale"



Re: [Github] Denied Access

2017-10-20 Thread Harbs
(You don’t need an apache email on Github. The important piece is to do the 
linking.)

> On Oct 20, 2017, at 5:15 PM, Harbs <harbs.li...@gmail.com> wrote:
> 
> You need to link your github account using the Gitbox setup:
> https://gitbox.apache.org/setup/ <https://gitbox.apache.org/setup/>
> 
>> On Oct 20, 2017, at 5:02 PM, Peter Ent <p...@adobe.com.INVALID 
>> <mailto:p...@adobe.com.INVALID>> wrote:
>> 
>> Hi,
>> 
>> It looks like I do not have the ability to push changes to the Apache Royale 
>> Github repos. I registered with GitHub.com <http://github.com/> using my 
>> Apache.org <http://apache.org/> email. Was that not the right thing to do?
>> 
>> —peter
> 



Re: [Github] Denied Access

2017-10-20 Thread Harbs
You need to link your github account using the Gitbox setup:
https://gitbox.apache.org/setup/ 

> On Oct 20, 2017, at 5:02 PM, Peter Ent  wrote:
> 
> Hi,
> 
> It looks like I do not have the ability to push changes to the Apache Royale 
> Github repos. I registered with GitHub.com using my Apache.org email. Was 
> that not the right thing to do?
> 
> —peter



Re: [royale-asjs] branch develop updated: Fix issue where setting "href" in a custom item renderer based on FooterLinkItemRenderer causes NPE

2017-10-26 Thread Harbs
I mean that I don’t understand why you added the null checking. That seems like 
"just in case". I also don’t understand how a Foot*Link*ItemRenderer could be 
missing a link element.

> On Oct 27, 2017, at 12:13 AM, Piotr Zarzycki <piotrzarzyck...@gmail.com> 
> wrote:
> 
> Hi Harbs,
> 
> You suggesting remove this part [1], and leave to the user setup it if he
> want to ? That is what you mean ?
> 
> [1] https://paste.apache.org/8F4x
> 
> Piotr
> 
> 
> 2017-10-26 23:07 GMT+02:00 Harbs <harbs.li...@gmail.com>:
> 
>> Isn’t this "just in case” code?
>> 
>> Why doesn’t the subclass just override the data setter if it doesn’t have
>> a link? (and why doesn’t it have one?)
>> 
>> Harbs
>> 
>>> On Oct 26, 2017, at 11:45 PM, pio...@apache.org wrote:
>>> 
>>> This is an automated email from the ASF dual-hosted git repository.
>>> 
>>> piotrz pushed a commit to branch develop
>>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>>> 
>>> 
>>> The following commit(s) were added to refs/heads/develop by this push:
>>>new 37b243e  Fix issue where setting "href" in a custom item
>> renderer based on FooterLinkItemRenderer causes NPE
>>> 37b243e is described below
>>> 
>>> commit 37b243e5badc88a23816118c86ececb4f0ded96c
>>> Author: Piotr Zarzycki <piotrzarzyck...@gmail.com>
>>> AuthorDate: Thu Oct 26 22:44:59 2017 +0200
>>> 
>>>   Fix issue where setting "href" in a custom item renderer based on
>> FooterLinkItemRenderer causes NPE
>>> ---
>>> .../royale/mdl/itemRenderers/FooterLinkItemRenderer.as   | 12
>> ++--
>>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>> 
>>> diff --git a/frameworks/projects/MaterialDesignLite/src/main/
>> royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
>> b/frameworks/projects/MaterialDesignLite/src/main/
>> royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
>>> index 19fd057..babab26 100644
>>> --- a/frameworks/projects/MaterialDesignLite/src/main/
>> royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
>>> +++ b/frameworks/projects/MaterialDesignLite/src/main/
>> royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
>>> @@ -85,11 +85,6 @@ package org.apache.royale.mdl.itemRenderers
>>>  public function set href(value:String):void
>>>  {
>>>_href = value;
>>> -
>>> -COMPILE::JS
>>> -{
>>> -(a as HTMLElement).setAttribute('href', value);
>>> -}
>>>  }
>>> 
>>>  COMPILE::JS
>>> @@ -121,7 +116,12 @@ package org.apache.royale.mdl.itemRenderers
>>>  if(textNode != null)
>>>  {
>>>  textNode.nodeValue = text;
>>> - }
>>> + }
>>> +
>>> +if (a != null)
>>> +{
>>> +(a as HTMLElement).setAttribute('href', href);
>>> +}
>>>  }
>>>  }
>>> 
>>> 
>>> --
>>> To stop receiving notification emails like this one, please contact
>>> ['"comm...@royale.apache.org" <comm...@royale.apache.org>'].
>> 
>> 
> 
> 
> -- 
> 
> Piotr Zarzycki
> 
> mobile: +48 880 859 557
> skype: zarzycki10
> 
> LinkedIn: http://www.linkedin.com/piotrzarzycki
> <https://pl.linkedin.com/in/piotr-zarzycki-92a53552>
> 
> GitHub: https://github.com/piotrzarzycki21



Re: [royale-asjs] branch develop updated: Fix issue where setting "href" in a custom item renderer based on FooterLinkItemRenderer causes NPE

2017-10-26 Thread Harbs
Isn’t this "just in case” code?

Why doesn’t the subclass just override the data setter if it doesn’t have a 
link? (and why doesn’t it have one?)

Harbs

> On Oct 26, 2017, at 11:45 PM, pio...@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> piotrz pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
> new 37b243e  Fix issue where setting "href" in a custom item renderer 
> based on FooterLinkItemRenderer causes NPE
> 37b243e is described below
> 
> commit 37b243e5badc88a23816118c86ececb4f0ded96c
> Author: Piotr Zarzycki <piotrzarzyck...@gmail.com>
> AuthorDate: Thu Oct 26 22:44:59 2017 +0200
> 
>Fix issue where setting "href" in a custom item renderer based on 
> FooterLinkItemRenderer causes NPE
> ---
> .../royale/mdl/itemRenderers/FooterLinkItemRenderer.as   | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git 
> a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
>  
> b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
> index 19fd057..babab26 100644
> --- 
> a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
> +++ 
> b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/itemRenderers/FooterLinkItemRenderer.as
> @@ -85,11 +85,6 @@ package org.apache.royale.mdl.itemRenderers
>   public function set href(value:String):void
>   {
> _href = value;
> -
> -COMPILE::JS
> -{
> -(a as HTMLElement).setAttribute('href', value);
> -}
>   }
> 
>   COMPILE::JS
> @@ -121,7 +116,12 @@ package org.apache.royale.mdl.itemRenderers
>   if(textNode != null)
>   {
>   textNode.nodeValue = text;
> - }   
> + }
> +
> +if (a != null)
> +{
> +(a as HTMLElement).setAttribute('href', href);
> +}
>   }
>   }
> 
> 
> -- 
> To stop receiving notification emails like this one, please contact
> ['"comm...@royale.apache.org" <comm...@royale.apache.org>'].



Re: Apache Royale WebSite Preview

2017-10-22 Thread Harbs
> I don't think so, since Codeoscopic buyed the license already

Just to be clear: You bought the license for the Royale site? Or are you saying 
that Royale is a “client” of Codeoscopic?

> I think there's an Jekyll exporter too but we need to check it and see how it 
> behaves.

Sounds interesting!

>> 3. What (if any) of the theme can be placed in a public repository to make
>> the main site a non-WordPress one? I imagine we’d need to ask both the
>> publisher of the theme and Apache legal.
>> 
> 
> I think we should doesn't do that, since is not what we want, following the
> example exposed before, is like if we use JIRA and for that reason want to
> upload the JIRA code to some of our repos...don't see any reason to do
> that. The site is only for marketing purposes and a tool. The rest: source
> code, binaries, wiki, issues, ... is what we produce and we deliver to our
> users.

What I mean is like this:

Currently, the royale.apache.org <http://royale.apache.org/> is built 
automatically by committing code here: 
https://github.com/apache/royale-website/tree/asf-site 
<https://github.com/apache/royale-website/tree/asf-site>

Ideally, our main site should be editable by folks simply applying a pull 
request on Github. I’m not clear whether the license for the theme would allow 
us to do that by adapting the CSS and JS for a static site. The WordPress theme 
would still be useful as a theme for parts of the site such as a blog (and that 
would not be on a public repo), but I do think we want consistent styling 
across everything.

Makes sense?

Harbs

> On Oct 23, 2017, at 12:47 AM, Carlos Rovira <carlosrov...@apache.org> wrote:
> 
> Hi Harbs,
> 
> 
> 2017-10-22 23:00 GMT+02:00 Harbs <harbs.li...@gmail.com>:
> 
>> Hi Carlos,
>> 
>> Very impressive!
>> 
>> The direction is great! Awesome work!
>> 
> 
> Thanks for the Kindly words! :)
> 
> 
>> 
>> I do have some questions which I think we need to address:
>> 
>> It looks like you used the Movedo WordPress theme for this[1] which is a
>> commercial WordPress theme.
>> 
>> This brings up some questions:
>> 
>> 1. Presumably we’d need to buy a license to use it for the project. We’d
>> need to ask exactly what the right procedure is for doing so.
>> 
> 
> I don't think so, since Codeoscopic buyed the license already, and as David
> Fisher said we can use a commercial projects to market this project, since
> is not part of the code of the project, just a tool, like if we use JIRA or
> Itellij IDEA, or other think like that
> 
> 
> 
>> 2. Does this lock us into WordPress? Would we be able to use these design
>> elements for a “normal” site?
>> 
> 
> I want to try to use a plugin to export it and create an static site,
> sincerely I never try that before. I think there's an Jekyll exporter too
> but we need to check it and see how it behaves. In that case, we can
> operate in Wordpress and then export to our production site.
> 
> 
>> 3. What (if any) of the theme can be placed in a public repository to make
>> the main site a non-WordPress one? I imagine we’d need to ask both the
>> publisher of the theme and Apache legal.
>> 
> 
> I think we should doesn't do that, since is not what we want, following the
> example exposed before, is like if we use JIRA and for that reason want to
> upload the JIRA code to some of our repos...don't see any reason to do
> that. The site is only for marketing purposes and a tool. The rest: source
> code, binaries, wiki, issues, ... is what we produce and we deliver to our
> users.
> 
> 
>> 4. Have any other projects done something similar to use as a policy
>> trendsetter?
>> 
> 
> Don't know, but what made me work on this was some words from Dave Fisher
> in the same line of what I exposed here.
> 
> Let's see the rest competing about this :)
> 
> Carlos
> 
> 
> 
>> 
>> Harbs
>> 
>> [1]https://themeforest.net/item/movedo-we-do-move-your-world/17923709 <
>> https://themeforest.net/item/movedo-we-do-move-your-world/17923709>
>> 
>> 



Re: [MAVEN-BUILD] Royale-asjs - Build # 485 - Failure

2018-02-12 Thread Harbs
The relevant extern file appears to be: w3c_css.js

Harbs

> On Feb 12, 2018, at 1:16 PM, Harbs <ha...@in-tools.com> wrote:
> 
> The externs for CSSStyleDeclaration has `overflow`, but it’s missing 
> `overflowX` and `overflowY`.
> 
> That’s causing these two lines to fail (only in maven for some reason):
> 
> (value as UIBase).element.style.overflowY = "auto";
> (contentView as UIBase).element.style.overflowY = "auto”;
> 
> I could change these lines to:
> (value as UIBase).element.style[“overflowY”] = "auto";
> (contentView as UIBase).element.style[“overflowY”] = "auto”;
> 
> Although, I think patching the extern file is probably a better solution.
> 
> I’m not clear on how to patch it though. Any pointers?
> 
> Harbs
> 
>> On Feb 12, 2018, at 1:00 PM, Apache Jenkins Server 
>> <jenk...@builds.apache.org> wrote:
>> 
>> The Apache Jenkins build system has built Royale-asjs (build #485)
>> 
>> Status: Failure
>> 
>> Check console output at https://builds.apache.org/job/Royale-asjs/485/ to 
>> view the results.
> 



Re: [MAVEN-BUILD] Royale-asjs - Build # 485 - Failure

2018-02-12 Thread Harbs
I think I figured it out. Here’s what I did:

1. I added the w3c_css.js file to an unrelated git repo and committed it.
2. I added the properties to the file.
3. I ran git diff on the repo, which gave the the changes.
4. I copied the output into js.patch
5. I changed the path of w3c_css.js in the patch to 
`js/target/downloads/browser`

That seemed to do it…

Harbs

> On Feb 12, 2018, at 1:17 PM, Harbs <ha...@in-tools.com> wrote:
> 
> The relevant extern file appears to be: w3c_css.js
> 
> Harbs
> 
>> On Feb 12, 2018, at 1:16 PM, Harbs <ha...@in-tools.com> wrote:
>> 
>> The externs for CSSStyleDeclaration has `overflow`, but it’s missing 
>> `overflowX` and `overflowY`.
>> 
>> That’s causing these two lines to fail (only in maven for some reason):
>> 
>> (value as UIBase).element.style.overflowY = "auto";
>> (contentView as UIBase).element.style.overflowY = "auto”;
>> 
>> I could change these lines to:
>> (value as UIBase).element.style[“overflowY”] = "auto";
>> (contentView as UIBase).element.style[“overflowY”] = "auto”;
>> 
>> Although, I think patching the extern file is probably a better solution.
>> 
>> I’m not clear on how to patch it though. Any pointers?
>> 
>> Harbs
>> 
>>> On Feb 12, 2018, at 1:00 PM, Apache Jenkins Server 
>>> <jenk...@builds.apache.org> wrote:
>>> 
>>> The Apache Jenkins build system has built Royale-asjs (build #485)
>>> 
>>> Status: Failure
>>> 
>>> Check console output at https://builds.apache.org/job/Royale-asjs/485/ to 
>>> view the results.
>> 
> 



Re: [MAVEN-BUILD] Royale-asjs - Build # 485 - Failure

2018-02-12 Thread Harbs
The externs for CSSStyleDeclaration has `overflow`, but it’s missing 
`overflowX` and `overflowY`.

That’s causing these two lines to fail (only in maven for some reason):

(value as UIBase).element.style.overflowY = "auto";
(contentView as UIBase).element.style.overflowY = "auto”;

I could change these lines to:
(value as UIBase).element.style[“overflowY”] = "auto";
(contentView as UIBase).element.style[“overflowY”] = "auto”;

Although, I think patching the extern file is probably a better solution.

I’m not clear on how to patch it though. Any pointers?

Harbs

> On Feb 12, 2018, at 1:00 PM, Apache Jenkins Server 
> <jenk...@builds.apache.org> wrote:
> 
> The Apache Jenkins build system has built Royale-asjs (build #485)
> 
> Status: Failure
> 
> Check console output at https://builds.apache.org/job/Royale-asjs/485/ to 
> view the results.



Re: [MAVEN-BUILD] Royale-asjs - Build # 485 - Failure

2018-02-12 Thread Harbs
How do we ge royale-typedefs to be built on the Jenkins server? I checked and 
my changes did not seem to queue the job.

Harbs

> On Feb 12, 2018, at 1:48 PM, Harbs <ha...@in-tools.com> wrote:
> 
> I think I figured it out. Here’s what I did:
> 
> 1. I added the w3c_css.js file to an unrelated git repo and committed it.
> 2. I added the properties to the file.
> 3. I ran git diff on the repo, which gave the the changes.
> 4. I copied the output into js.patch
> 5. I changed the path of w3c_css.js in the patch to 
> `js/target/downloads/browser`
> 
> That seemed to do it…
> 
> Harbs
> 
>> On Feb 12, 2018, at 1:17 PM, Harbs <ha...@in-tools.com> wrote:
>> 
>> The relevant extern file appears to be: w3c_css.js
>> 
>> Harbs
>> 
>>> On Feb 12, 2018, at 1:16 PM, Harbs <ha...@in-tools.com> wrote:
>>> 
>>> The externs for CSSStyleDeclaration has `overflow`, but it’s missing 
>>> `overflowX` and `overflowY`.
>>> 
>>> That’s causing these two lines to fail (only in maven for some reason):
>>> 
>>> (value as UIBase).element.style.overflowY = "auto";
>>> (contentView as UIBase).element.style.overflowY = "auto”;
>>> 
>>> I could change these lines to:
>>> (value as UIBase).element.style[“overflowY”] = "auto";
>>> (contentView as UIBase).element.style[“overflowY”] = "auto”;
>>> 
>>> Although, I think patching the extern file is probably a better solution.
>>> 
>>> I’m not clear on how to patch it though. Any pointers?
>>> 
>>> Harbs
>>> 
>>>> On Feb 12, 2018, at 1:00 PM, Apache Jenkins Server 
>>>> <jenk...@builds.apache.org> wrote:
>>>> 
>>>> The Apache Jenkins build system has built Royale-asjs (build #485)
>>>> 
>>>> Status: Failure
>>>> 
>>>> Check console output at https://builds.apache.org/job/Royale-asjs/485/ to 
>>>> view the results.
>>> 
>> 
> 



Re: [MAVEN-BUILD] Royale-typedefs - Build # 34 - Failure

2018-02-13 Thread Harbs
We need to add svn checkout of the externs like I did in the ant script.

> On Feb 13, 2018, at 1:36 PM, Apache Jenkins Server 
>  wrote:
> 
> The Apache Jenkins build system has built Royale-typedefs (build #34)
> 
> Status: Failure
> 
> Check console output at https://builds.apache.org/job/Royale-typedefs/34/ to 
> view the results.



Re: [MAVEN-BUILD] Royale-typedefs - Build # 40 - Still Failing

2018-02-14 Thread Harbs
I don’t understand the console output.

Suggestions?

> On Feb 14, 2018, at 10:50 AM, Apache Jenkins Server 
>  wrote:
> 
> The Apache Jenkins build system has built Royale-typedefs (build #40)
> 
> Status: Still Failing
> 
> Check console output at https://builds.apache.org/job/Royale-typedefs/40/ to 
> view the results.



Re: [MAVEN-BUILD] Royale-typedefs - Build # 39 - Still Failing

2018-02-14 Thread Harbs
Piotr,

Could you manually run the maven build. I’d like to see if I fixed it…

> On Feb 14, 2018, at 10:39 AM, Apache Jenkins Server 
>  wrote:
> 
> The Apache Jenkins build system has built Royale-typedefs (build #39)
> 
> Status: Still Failing
> 
> Check console output at https://builds.apache.org/job/Royale-typedefs/39/ to 
> view the results.



Re: Support for SVG in older browsers and Operating Systems.

2018-02-24 Thread Harbs
I’m thinking that we should just add a Flash implementation of Map and WeakMap 
so users can simply use them directly. If they’re targeting browsers which 
support those classes, there’s no reason to have the overhead of an extra class 
to act as a proxy.

I do think we should replace the good event library for a few reasons:
1. I’m pretty sure that it’s heavier than we really need.
2. Like Alex mentions, there’s likely additional features we want.
3. I really wish we had the *option* to output node-style requires instead of 
good.require. If we could output node-style modules and requires, node modules 
could be first class citizens in Royale JS apps. Reliance on the closure 
libraries makes that much more difficult.

My $0.02,
Harbs

> On Feb 25, 2018, at 6:03 AM, Greg Dove <greg.d...@gmail.com> wrote:
> 
> With respect Alex, that does not sound too convincing to me. It is very
> 'what if' based.
> In my experience working within large enterprise (only pharma - which might
> not be typical) anything that was not officially supported with security
> updates was very quickly avoided.
> 
> It would be a shame to hold back Royale based on that kind of premise
> unless it was validated, imo.
> One 'PAYG' option for this type of thing might be to not try to code too
> much 'polyfill' stuff into the framework itself and perhaps require
> external standardized polyfills as external js libs for the older browsers.
> This seems to be what React has done [1]
> That approach would still be limiting for features that can only be
> addressed as polyfills though, and I'm pretty sure WeakMap is not one of
> those.
> 
> In terms of the weak reference listeners, perhaps WeakMap would allow the
> possibility of actually achieving something there - I'm not sure (although
> I expect it would probably be challenging), but I can't imagine getting
> close to it without something like that to start with.
> 
> 1.https://reactjs.org/docs/javascript-environment-requirements.html
> 
> 
> 
> On Sun, Feb 25, 2018 at 1:54 PM, Alex Harui <aha...@adobe.com.invalid>
> wrote:
> 
>> I am told (no way to prove it) that if you are big enough company, you can
>> get an extended support deal for one older version of IE than most people
>> think you can.  And many big companies standardize on IE using it almost
>> like old green-screen terminals from before many of you were born.
>> 
>> It would be really sad if some huge company came up to us and said "we're
>> ready to migrate to Royale if you support IE(x)" and we said no and lost
>> the participation.  Since we can't easily react quickly to retrofitting
>> old IE versions, I am tempted to make sure we work on IE one version back.
>> That used to be 8 when we first started, right now it is 9, but it might
>> be safe to go to 10, especially if it is a component set and not somewhere
>> in the core.
>> 
>> One other point to consider:  Dictionary might be implementable on
>> WeakMap, but I'm more concerned about weak reference event listeners (not
>> to mention, priority listeners) that are two things Flash supports that
>> Google Closure Library's event subsystem does not.  How and when would we
>> write such a thing and test it well enough to know it will work well
>> enough to cut over to it and replace GCL's event subsystem that we
>> currently use?
>> 
>> -Alex
>> 
>> On 2/24/18, 3:52 PM, "Piotr Zarzycki" <piotrzarzyck...@gmail.com> wrote:
>> 
>>> Actually I'm even more for forget about IE11 and take care of Edge, Chrom
>>> and Firefox. Before we got 1.0 maybe IE11 finally die. Sorry my experience
>>> with that browser is awful.
>>> 
>>> Piotr
>>> 
>>> 2018-02-24 22:19 GMT+01:00 Greg Dove <greg.d...@gmail.com>:
>>> 
>>>> That sounds great Harbs, so I guess the question is more: do we need to
>>>> support IE10 and below, because targeting official support for these
>>>> browsers seems to hold Royale back?
>>>> 
>>>> If we did not do that, then we can avoid the 'just in case' support for
>>>> them (legacy browser compatibility in classes like ObjectMap could be an
>>>> explicit PAYG choice instead of default).
>>>> It really hinges on what the baseline browser compatibility is/should be
>>>> for Royale, and I think that might simply need a revisit/review given
>>>> that
>>>> time has passed and more will pass before 1.0.
>>>> If IE10 and under holds us back a lot, and if it is unvalued by Royale
>>>> users (idk whether it is or not, this is up for debate) then maybe it
>>>> s

Re: Refactoring Layouts

2018-02-26 Thread Harbs
Yes. Grid is better than Flexbox for most things, but going with grid really 
depends on what browsers we’re supporting.

IE 10 and 11 do support grid, but their support for grid is based on an old 
spec. Edge got support for grid only recently.

https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-to-use-the-ie-implementation-of-css-grid-layout/
 

https://gridbyexample.com/browsers/ 

> On Feb 26, 2018, at 9:43 AM, Carlos Rovira  wrote:
> 
> Hi Alex,
> 
> two things here:
> 
> 1) while reading about css layouts seems Grid system is the most
> sophisticated one and is better than flexbox, so I think we should change
> to that since flex box does not support some layouts and Grid seems the
> future and more like what we had in flex
> 
> 2) yesterday making a simple blog example I put a vertical layout in a view
> and a simple Js:button in SWF version button gets all the horizontal space
> while in js is not affected. I think this differences must be removed since
> if we post some example with both versions, both must be visuals equal (as
> much as we can), but this difference is huge
> 
> 
> 2018-02-26 6:39 GMT+01:00 Alex Harui :
> 
>> Hi,
>> 
>> Time for another refactoring of layout.  My goal for this round is to move
>> the border/padding/margin calculations into the ValuesManager, and get the
>> JS version to use getComputedStyle.  I think it will be cleaner to
>> abstract the differences between SWF and JS in the ValuesManager and allow
>> for different IValuesImpls to have different levels of sophistication for
>> SWF.
>> 
>> Right now, our "FlexibleChild" layouts are not factoring in margins
>> correctly.
>> 
>> Thoughts?
>> -Alex
>> 
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: Royale and Websites (was Re: About website actual work in progress)

2017-12-22 Thread Harbs
Some thoughts:

1. This is a great initiative!
2. The speed that the page loaded is incredible. First draw was less than a 
second and fully loaded was less than 2 seconds — with cache disabled.
3. Ultimately I think this is the way we want to go, but getting the polish on 
this right will take a significant effort. It might make sense to initially use 
the version exported from Wordpress and only later swap it to a Royale version.
4. I’m not sure how I feel about including RoyaleSite in projects.
5. I like the organization of the page and the “web components”. I think it’s a 
real proof of concept that MXML can be used for structure and re-usable pieces 
simplified.
6. Multiple pages is the sticky point here. We definitely could make each page 
a separate project, but I would really like if we would have a better story for 
multiple pages. Initially we could have post-build scripts to copy the assets 
to the correct structure to make it easy to deploy.

Longer term plans for multiple pages I think requires handling two difference 
scenarios:
1. Page routing/deep linking. This is necessary for two things:
  a) Loading an app in a specific initial state.
  b) switching to new “pages” in apps where the vast majority of content is 
shared across pages and/or there are transitions between pages.
2. Allowing compiling multiple “pages” in a single project. Here’s some 
thoughts on how it may work:
  a) mxml pages should be specify-able to the compiler as “pages” which would 
be output as separate html pages with linked JS files. This could be either 
output to separate folders with index.html files for each, or all to a single 
folder with differently named html files.
  b) Not sure whether CSS files should be shared across multiple pages or not.
  c) It would be great to have an option to have shared code loaded as modules 
so it could be cached. I’m not sure how this would be specified. Maybe 
including a JS file which includes all Framework code used across all pages? 
Framework code could be defined by anything included in a swc. Maybe compiler 
options to specify which swcs would be “modules” and which would be hard-linked 
into application code? Not sure…

Either way, I think the Royale site falls more into the second category than 
the first.

My $0.02,
Harbs

> On Dec 22, 2017, at 10:36 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> Hi,
> 
> First, thanks to Carlos for all of the work he's been putting into the
> future Royale web site.
> 
> While waiting on something from Infra, I decided to try to approximate the
> home page that Carlos has been working on [1].  I wanted to do so for the
> following reasons:
> -try to eliminate the dependency on commercial and paid-for resources
> -try to make the source for the site available to more people so that
> Carlos doesn't have the pressure of us waiting on him
> -try to carve out reusable pieces of the look-and-feel for use elsewhere,
> like our ASDoc pages and maybe Olaf's Try-It-Now app.
> 
> My crude approximation is here: [2]
> Source is in Git here [3].
> 
> [1] http://royale.codeoscopic.com
> [2] http://home.apache.org/~aharui/RoyaleWebsite/html/
> [3] 
> https://github.com/apache/royale-asjs/tree/feature/royalesite/examples/roya
> le/RoyaleWebsite/src/html
> 
> There are no cool animations, the colors aren't quite right nor is the
> spacing, but it is a start.  I replaced the ET-Line fonts with FontAwesome
> so I had to choose some different graphics.
> 
> Anyway, putting this together got me thinking about Royale and our
> extensible component model.  Royale is all about productivity.  And to me,
> one irritating thing about working with native HTML is the duplication of
> tags.  If you look at the source in [3], I had to copy sets of tags and
> update the content inside without accidentally deleting a tag or quote or
> something.  IMO, the whole point of Royale is to allow anybody to improve
> productivity by eliminating duplication and reduce maintenance costs.  The
> idea is that any repeating pattern of HTML tags should be encapsulated
> into a Royale component.
> 
> So, I spent a couple of days doing that.  I created components for the
> repeating patterns I had to use to create [2].  For example, I created a
> ResponsiveTableTile that represents the six tiles in the middle of [1],
> and created a TitledAnchorList to encapsulate the links at the bottom of
> [1] and created a few other components as well.  I also modified the HTML
> set and the compiler to allow nested HTML components in a more "natural"
> way.
> 
> The result is at [4]. It is the debug version so it takes a bit to load.
> The MXML is at [5].  You can compare it to [3].
> The components and example are checked into a feature/royalesite branch
> 
> [4] http://home.apache.org/~aharui/RoyaleWebsite/royale

Re: Royale and Websites (was Re: About website actual work in progress)

2017-12-22 Thread Harbs
FYI, with cache enabled the page load was so fast that there was no noticeable 
browser redraw! I’m blown away by the performance!

> On Dec 22, 2017, at 12:19 PM, Harbs <harbs.li...@gmail.com> wrote:
> 
> 2. The speed that the page loaded is incredible. First draw was less than a 
> second and fully loaded was less than 2 seconds — with cache disabled.



Royale RealWorld Benchmark

2017-12-21 Thread Harbs
There’s an interesting comparison of many web frameworks.[1]

It would be really interesting to do a Royale version and see how it compares 
to the others.

Anyone interested in working on this? (It would be a while before I could think 
of spending the time.)

Harbs

[1]https://github.com/gothinkster/realworld 
<https://github.com/gothinkster/realworld>

Re: TypeNames vs ClassName

2018-02-26 Thread Harbs
Yes. Very thorough explanation. Thanks.

It seems to me like there should be functions for addClassName() and 
removeClassName() which would add and remove the classNames from a list. When 
the className is computed, the list should be concatenated to classNames (and 
possibly typeNames — although we might not need typeNames if there’s a general 
list). We might also want a clearClassNames() method to allow removal of 
“default” classNames for classes which have such a need.

I do think we also need a className setter so classNames could be specified in 
mxml, but we might be able to do away with typeNames. That might simplify 
things.

My $0.02,
Harbs


> On Feb 26, 2018, at 8:09 PM, Piotr Zarzycki <piotrzarzyck...@gmail.com> wrote:
> 
> Hi Alex,
> 
> Great reading and explanation. My first thought was to have something which
> computes className together, but currently it is needed for MDL only
> almost. I went with this additional function Utility.
> I think there won't be too much time when we will need such ability like
> switching and adding shadow css classes etc.
> 
> If other also think about such function I would be happy to implement it.
> It will really get rid of a lot of dump code and even some workarounds in
> MDL. Live would be much easier.
> 
> +1 to have such functions.
> 
> All of that should land on the Wiki or somewhere in the documentation.
> 
> Waiting for thoughts from others.
> 
> Thanks, Piotr
> 
> 2018-02-26 18:50 GMT+01:00 Alex Harui <aha...@adobe.com.invalid>:
> 
>> Here's my view of this problem space.  This is my opinion, not marching
>> orders.  Everything is up for discussion.  This is what the current code
>> is trying to do, though.  Also, important note:  The order of names in the
>> HTMLElement.className does not matter.  CSS style precedence is determined
>> by the order of declarations in the CSS file.  OK, lots of reading ahead:
>> 
>> HTML and JavaScript do not really have a first-class notion of a Class
>> like we do in ActionScript.  IOW, no such thing as true subclassing,
>> especially in a way that supports Reflection APIs like
>> flash.utils.getQualifiedClassName.  So, there is a fixed set of types in
>> the browser, such as Button, Input, Div (which, by the way, are
>> implemented as instances of HTMLButtonElement, HTMLInputElement,
>> HTMLDivElement and not just Button, Input, Div).  And thus, a fixed set of
>> Type Selectors in CSS.  You can't really make up new Type selectors, AFAIK.
>> 
>> A CSS Class selector is the way that you can distinguish one set of, say,
>> HTMLDivElements, from another set of HTMLDivElements.  Since you can't
>> make subclasses and new type selectors, you set the HTML class or
>> JavaScript HTMLElement.className/classList on individual HTML elements and
>> declare them to be of class "BigButton" or whatever.  It is their form of
>> subclassing.
>> 
>> In Flex/Flash/SWF/ActionScript, folks are used to being able to make a
>> subclass of Button called BigButton.  And add a Type Selector for it in a
>> CSS file as "BigButton {}" and not ".BigButton {}".  And the Flex/Royale
>> compilers know that if you don't have a BigButton in the final output, it
>> doesn't output the CSS for BigButton, making your app smaller.  If you use
>> class selectors and ".BigButton" the Flex/Royale compilers do not search
>> the code to see if some code sets className to "BigButton" and it really
>> probably never can since you might have code that does:
>> 
>> var kinds:Array ["Big", "Little", "Puny"];
>> Foo.className = kinds[i] + "Button";
>> 
>> So, IMO, in Royale we want to leverage ActionScript types and pretend to
>> extend the Type Selectors subsystem in CSS.  I think we can't actually
>> truly do it since the "*" selector will be masked by our fake Type
>> Selectors, but it should be good enough, and it allows the compiler to
>> prune CSS that isn't used.
>> 
>> So, I think we want a convention where each class sets the "typename"
>> property to itself if it wants to support a fake Type Selector.  I
>> considered having the compiler auto-generate it but that isn't really PAYG
>> for small lightweight subclasses that won't ever have a fake Type Selector.
>> 
>> Now in Flex, and Royale's SimpleCSSValuesImpl for SWF, Type Selectors from
>> ancestor classes apply to subclasses.  We did that because it was a pain
>> to have to copy all of Label's Type Selector into a MultilineLabel Type
>> Selector and that duplication made the CSS file bigger.  So we want to

Re: TypeNames vs ClassName

2018-02-26 Thread Harbs
I think my main point was that we wouldn’t need computeFinalClassNames() which 
would be overridden in subclasses.

If there’s simple a _classList:Array which would have something like:
protected function applyClassNames():void
{
element.className = className ? className : “” + “ “ + 
_classList.join(“ “).trim();
}

Which could replace the setClassName() method.

The rest was simply how to go about building the _classList.

We’re probably more or less saying the same thing.

> On Feb 26, 2018, at 9:35 PM, Piotr Zarzycki <piotrzarzyck...@gmail.com> wrote:
> 
> Harbs,
> 
> You simply suggesting to have several functions instead of one which
> computes things?
> 
> 
> 
> On Mon, Feb 26, 2018, 20:21 Harbs <harbs.li...@gmail.com> wrote:
> 
>> Yes. Very thorough explanation. Thanks.
>> 
>> It seems to me like there should be functions for addClassName() and
>> removeClassName() which would add and remove the classNames from a list.
>> When the className is computed, the list should be concatenated to
>> classNames (and possibly typeNames — although we might not need typeNames
>> if there’s a general list). We might also want a clearClassNames() method
>> to allow removal of “default” classNames for classes which have such a need.
>> 
>> I do think we also need a className setter so classNames could be
>> specified in mxml, but we might be able to do away with typeNames. That
>> might simplify things.
>> 
>> My $0.02,
>> Harbs
>> 
>> 
>>> On Feb 26, 2018, at 8:09 PM, Piotr Zarzycki <piotrzarzyck...@gmail.com>
>> wrote:
>>> 
>>> Hi Alex,
>>> 
>>> Great reading and explanation. My first thought was to have something
>> which
>>> computes className together, but currently it is needed for MDL only
>>> almost. I went with this additional function Utility.
>>> I think there won't be too much time when we will need such ability like
>>> switching and adding shadow css classes etc.
>>> 
>>> If other also think about such function I would be happy to implement it.
>>> It will really get rid of a lot of dump code and even some workarounds in
>>> MDL. Live would be much easier.
>>> 
>>> +1 to have such functions.
>>> 
>>> All of that should land on the Wiki or somewhere in the documentation.
>>> 
>>> Waiting for thoughts from others.
>>> 
>>> Thanks, Piotr
>>> 
>>> 2018-02-26 18:50 GMT+01:00 Alex Harui <aha...@adobe.com.invalid>:
>>> 
>>>> Here's my view of this problem space.  This is my opinion, not marching
>>>> orders.  Everything is up for discussion.  This is what the current code
>>>> is trying to do, though.  Also, important note:  The order of names in
>> the
>>>> HTMLElement.className does not matter.  CSS style precedence is
>> determined
>>>> by the order of declarations in the CSS file.  OK, lots of reading
>> ahead:
>>>> 
>>>> HTML and JavaScript do not really have a first-class notion of a Class
>>>> like we do in ActionScript.  IOW, no such thing as true subclassing,
>>>> especially in a way that supports Reflection APIs like
>>>> flash.utils.getQualifiedClassName.  So, there is a fixed set of types in
>>>> the browser, such as Button, Input, Div (which, by the way, are
>>>> implemented as instances of HTMLButtonElement, HTMLInputElement,
>>>> HTMLDivElement and not just Button, Input, Div).  And thus, a fixed set
>> of
>>>> Type Selectors in CSS.  You can't really make up new Type selectors,
>> AFAIK.
>>>> 
>>>> A CSS Class selector is the way that you can distinguish one set of,
>> say,
>>>> HTMLDivElements, from another set of HTMLDivElements.  Since you can't
>>>> make subclasses and new type selectors, you set the HTML class or
>>>> JavaScript HTMLElement.className/classList on individual HTML elements
>> and
>>>> declare them to be of class "BigButton" or whatever.  It is their form
>> of
>>>> subclassing.
>>>> 
>>>> In Flex/Flash/SWF/ActionScript, folks are used to being able to make a
>>>> subclass of Button called BigButton.  And add a Type Selector for it in
>> a
>>>> CSS file as "BigButton {}" and not ".BigButton {}".  And the Flex/Royale
>>>> compilers know that if you don't have a BigButton in the final output,
>> it
>>>> doesn't output the CSS for BigButton, making your app smaller.  If you
>>

Re: Support for SVG in older browsers and Operating Systems.

2018-02-25 Thread Harbs
It’s not. Dictionary supports indexed access. ObjectMap requires set and get.

Harbs

> On Feb 25, 2018, at 10:02 AM, Carlos Rovira <carlosrov...@apache.org> wrote:
> 
> Hi Harbs,
> 
> if ObjectMap is a Dictionary, why don't you rename it to that? I think it
> will make more easy for new comers to get it
> 
> Thanks
> 
> 2018-02-24 21:59 GMT+01:00 Gabe Harbs <harbs.li...@gmail.com 
> <mailto:harbs.li...@gmail.com>>:
> 
>> There is a ObjectMap class which uses WeakMap or Map and falls back to
>> regular objects on platforms whether that is not supported.
>> http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap 
>> <http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap> <
>> http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap 
>> <http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap>>
>> 
>> It should be a decent replacement for Dictionary (including weak
>> references). The only caveat is you need to use get() and set() instead of
>> bracket access.
>> 
>> I just added documentation and cleaned it up a bit.
>> 
>> What’s interesting about that class is I needed to do some weird things
>> with the methods to reassign them. They are not showing up in the ASDoc
>> very well…
>> 
>> There might be a better way to declare the method (variable) proxies. Not
>> sure…
>> 
>> HTH,
>> Harbs
>> 
>>> On Feb 24, 2018, at 9:10 PM, Greg Dove <greg.d...@gmail.com> wrote:
>>> 
>>> That might make porting some legacy Flex code a
>>> lot easier, for example because (iiuc) I think that means Dictionary with
>>> weak keys could be supported. [3] (and I know Harbs did something related
>>> to this in the past, maybe some sort of polyfill, can't recall exactly)
>> 
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira <http://about.me/carlosrovira>


Re: Support for SVG in older browsers and Operating Systems.

2018-02-25 Thread Harbs
Some data points:

One of my client’s recently reported browser usage from a sampling of close to 
70,000 users. (IE 11 is the only version of IE that’s supported.)

Chrome was the #1 browser at 53.5%.
IE 11 was #2 at 24%
3, 4, and 5 were Safari, Firefox and Edge respectively.

With those kinds of percentages, I don’t think we should be dropping IE 11 
support. I’m not sure about IE 10 or IE 9.

Harbs

> On Feb 25, 2018, at 10:56 AM, Piotr Zarzycki <piotrzarzyck...@gmail.com> 
> wrote:
> 
> I've been working as a web developer many many years ago. You can't even
> imagine what kind of hacks we had to do in order to dispay something
> sophisticated in IE.
> My colleague who took from time to time some freelance job when Client
> wanted to be compatible with IE8 or whatever next version - always trippled
> the price because it was a nightmare. :)
> 
> I've been working for a Client (large corporation with thousends of
> thousends clients) 6 months ago who had big app in Flex. Where the time has
> come to move forward from Flex to modern web browser technology - There
> were absolutely no talk about supporting anything like IE. :)
> 
> IE - in whatever version for me -1 (Binding). :)
> 
> Thanks,
> Piotr
> 
> On Sun, Feb 25, 2018, 09:31 Carlos Rovira <carlosrov...@apache.org> wrote:
> 
>> Hi,
>> 
>> my opinion about fallback compatibility is that I expect people creating
>> Royale Apps in 2018 and beyond with actual browsers and systems, not with
>> old ones.
>> If a client has IE8 support, then normaly will have Edge, Chrome and
>> Firefox as well, or if target Android devices, they will be in at least in
>> Android 4 or 5. So it seems to me a hard task if we should take into
>> account older systems that nowadays has very low user base, and even a
>> nightmare since we should have to focus in test compatibility while we
>> don't have people to do so. So that's not doable by us.
>> 
>> So for me the plan should be to focus in the actual systems widely used and
>> when we get a state near 1.0 (not talking about the number itself, but the
>> feeling that we can make a Royale App with certain easeness and have almost
>> all the functionality we need), maybe it would be ok to look at what system
>> versions are most used and make a plan to stick with them as long as we
>> can, or at least taking care of how to evolve royale without breaking
>> things for that systems since we'll have users and Royale Apps out there
>> that needs to have that support.
>> 
>> 
>> 
>> 2018-02-25 9:02 GMT+01:00 Carlos Rovira <carlosrov...@apache.org>:
>> 
>>> Hi Harbs,
>>> 
>>> if ObjectMap is a Dictionary, why don't you rename it to that? I think it
>>> will make more easy for new comers to get it
>>> 
>>> Thanks
>>> 
>>> 2018-02-24 21:59 GMT+01:00 Gabe Harbs <harbs.li...@gmail.com>:
>>> 
>>>> There is a ObjectMap class which uses WeakMap or Map and falls back to
>>>> regular objects on platforms whether that is not supported.
>>>> http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap <
>>>> http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap>
>>>> 
>>>> It should be a decent replacement for Dictionary (including weak
>>>> references). The only caveat is you need to use get() and set() instead
>> of
>>>> bracket access.
>>>> 
>>>> I just added documentation and cleaned it up a bit.
>>>> 
>>>> What’s interesting about that class is I needed to do some weird things
>>>> with the methods to reassign them. They are not showing up in the ASDoc
>>>> very well…
>>>> 
>>>> There might be a better way to declare the method (variable) proxies.
>> Not
>>>> sure…
>>>> 
>>>> HTH,
>>>> Harbs
>>>> 
>>>>> On Feb 24, 2018, at 9:10 PM, Greg Dove <greg.d...@gmail.com> wrote:
>>>>> 
>>>>> That might make porting some legacy Flex code a
>>>>> lot easier, for example because (iiuc) I think that means Dictionary
>>>> with
>>>>> weak keys could be supported. [3] (and I know Harbs did something
>>>> related
>>>>> to this in the past, maybe some sort of polyfill, can't recall
>> exactly)
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Carlos Rovira
>>> http://about.me/carlosrovira
>>> 
>>> 
>> 
>> 
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>> 



Re: [royale-asjs] 01/01: Added Map

2018-02-25 Thread Harbs
I need help here:

By adding the Map class for SWF, that seems to mess up the Map reference in JS 
blocks in ObjectMap. For some reason, the SWF class makes the compiler not find 
the extern definition of Map on the JS side. I’m not sure why.

Any thoughts?
Harbs

> On Feb 25, 2018, at 1:30 PM, ha...@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> harbs pushed a commit to branch feature/native-js
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> commit fa36e70dc9dfd924db30a512f1a2f8622e218ae4
> Author: Harbs <ha...@in-tools.com>
> AuthorDate: Sun Feb 25 13:30:10 2018 +0200
> 
>Added Map
> ---
> .../projects/Core/src/main/royale/CoreClasses.as   |   6 ++
> frameworks/projects/Core/src/main/royale/Map.as| 101 +
> 2 files changed, 107 insertions(+)
> 
> diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as 
> b/frameworks/projects/Core/src/main/royale/CoreClasses.as
> index 0408118..fc9595e 100644
> --- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
> +++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
> @@ -224,6 +224,12 @@ internal class CoreClasses
>   import org.apache.royale.core.WrappedHTMLElement 
> ;WrappedHTMLElement;
>   import org.apache.royale.core.IRoyaleElement; IRoyaleElement;
>   }
> +
> + //JS native classes
> + COMPILE::SWF
> + {
> + import Map; Map;
> + }
>   //Package Level Functions
>   import org.apache.royale.debugging.assert; assert;
>   import org.apache.royale.debugging.assertType; assertType;
> diff --git a/frameworks/projects/Core/src/main/royale/Map.as 
> b/frameworks/projects/Core/src/main/royale/Map.as
> new file mode 100644
> index 000..e2549ea
> --- /dev/null
> +++ b/frameworks/projects/Core/src/main/royale/Map.as
> @@ -0,0 +1,101 @@
> +
> +//
> +//  Licensed to the Apache Software Foundation (ASF) under one or more
> +//  contributor license agreements.  See the NOTICE file distributed with
> +//  this work for additional information regarding copyright ownership.
> +//  The ASF licenses this file to You under the Apache License, Version 2.0
> +//  (the "Licens"); you may not use this file except in compliance with
> +//  the License.  You may obtain a copy of the License at
> +//
> +//  http://www.apache.org/licenses/LICENSE-2.0
> +//
> +//  Unless required by applicable law or agreed to in writing, software
> +//  distributed under the License is distributed on an "AS IS" BASIS,
> +//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +//  See the License for the specific language governing permissions and
> +//  limitations under the License.
> +//
> +
> +package
> +{
> +COMPILE::SWF
> +{
> +import flash.utils.Dictionary;
> +}
> +COMPILE::SWF
> +public class Map
> +{
> +public function Map(iterable:Object=null)
> +{
> +dict = new Dictionary();
> +}
> +
> +private var dict:Dictionary;
> +public static const length:int = 0;
> +
> +private var _keys:Array = [];
> +public function get size():int
> +{
> +return _keys.length;
> +}
> +
> +public function clear():void
> +{
> +dict = new Dictionary();
> +_keys = [];
> +}
> +
> +public function delete(key:*):Boolean
> +{
> +var idx:int = _keys.indexOf(key);
> +if(idx != -1){
> +_keys.splice(idx,1);
> +}
> +return delete dict[key];
> +}
> +
> +//TODO requires Iterator
> +// public function entries():Iterator
> +// {
> +
> +// }
> +
> +public function forEach(callback:Function,thisArg:Object = null):void
> +{
> +thisArg = thisArg ? thisArg : this;
> +var len:int = _keys.length;
> +for(var i:int = 0; i < len; i++)
> +{
> +callback.call(thisArg,dict[_keys[i]],i,this);
> +}
> +}
> +
> +public function get(key:Object):*
> +{
> +return dict[key];
> +}
> +
> +public function has(key:Object):Boolean
> +{
> +return dict[key] != null;
> +}
> +
> +//TODO requires Iterator
> 

Re: BinaryData and odd bytes

2018-06-21 Thread Harbs
Cool.

FYI there are still some issues to resolve:

1. readFloat and readDouble should have the same issues as the various int read 
methods. I did not fix that yet because calculating floats and doubles is 
harder than ints. I’m not sure of the best way to handle that. One way is to 
create a new temporary ArrayBuffer with only the necessary bytes and read that. 
Another would be to use DataViews for floats and doubles. A third would be to 
actually do the math for floating point numbers…

2. I did not fix any of the write methods. They should have the same issue as 
the read methods.

If you have the time to resolve these remaining issues, that would be awesome. 
:-)

Harbs

> On Jun 21, 2018, at 11:55 PM, Greg Dove  wrote:
> 
> Thanks Harbs - that short explanation makes it very clear.  Thanks for
> fixing my broken implementation :). I am guilty of not covering 'real
> world' combinations in the tests, which was what I used to guide
> development when I was working on this originally.
> 
> I am pretty sure I did have also have an interim implementation doing the
> bytewise reads/writes and dealing with endian-ness branching along the way,
> then I switched to using the typed arrays when I saw a performance boost.
> I wish I had written something like your new test before I did that :).
> I did a quick search for this and read up on the issue about the offset. I
> guess that also partly explains why the typed array performance is 'faster'
> (possibly due to the alignment I mean). And I did not do memory profiling,
> so maybe Alex is right - there could also have been a massive GC dump after
> my large loop tests, something that I was not seeing because I was only
> focused on speed at the time.
> 
> I had to add the 'sysEndian' flag approach internally when I switched to
> using the typed arrays (and only reordering the result if it was different
> to the 'native' endian used in the typed arrays). If everything is based on
> bytewise approach now, that flag should no longer be needed I think (you
> may already have done that, I did not look at your changes in detail yet -
> will check them out this weekend).
> 
> Obviously having this working correctly comes first, but with a
> comprehensive set of tests, we do have the ability to more easily respond
> to changes in the browser engines over time and update the implementation
> if, for example, DataView becomes faster across the board. I did see it
> working faster in one of the browsers I tested in, but I am not confident
> that I kept a good record of all this...
> 
> I will look in more detail this weekend, but for now it sounds like you
> have resolved the issue - well done! I hope I can get into some more work
> on Royale again soon.
> 
> 
> 
> On Thu, 21 Jun 2018, 21:04 Harbs,  wrote:
> 
>> I just added a unit test for this.
>> 
>> The test will fail with a RTE using the old implementation.
>> 
>> Explanation: After reading the first byte, the position is 1 which doesn’t
>> align with a 16IntArray.
>> 
>> Thanks,
>> Harbs
>> 
>>> On Jun 21, 2018, at 1:48 AM, Greg Dove  wrote:
>>> 
>>> I am not sure what the int16/int-aligned issue is yet (I have not read
>> back
>>> through all the relevant history) but if we can set up a unit test for
>> it,
>>> this stuff all becomes much clearer I think.
>> 
>> 



Re: Problem with "this" inside static method

2018-06-19 Thread Harbs
I’m pretty sure this is not a problem with static functions per se. It seems to 
be a general functional problem. Here’s another place I ran into issues:

I have some code inside a public function:

this.glyphInfos = glyphRun.glyphs.map(function(glyph):GlyphInfo{return new 
GlyphInfo(this.font, glyph.id, glyph.codePoints.slice())});

This gets cross-compiled into:

var /** @type {Function} */ __localFn0__ = function(glyph) {
return new com.printui.fontkit.opentype.GlyphInfo(this.font, glyph.id, 
glyph.codePoints.slice());
}
this.glyphInfos = glyphRun.glyphs.map(__localFn0__);

When the function is inline, “this” refers to the class instance.

After being pulled out into a local variable, “this” refers to the global 
Window object.

I can rewrite the cases I keep bumping into with these problems, but it seems 
to me like this is something we really need to fix.

I looked at the compiler code, but I don’t see any comments on why this is 
happening. I’m not sure what you mean about ES5 strict mode. The only 
limitation is that function statements (i.e. named functions) need to be at the 
top level of a script or function. This should not effect anonymous functions 
at all. I think we should leave top-level functions alone as well.

I tried to follow the logic on how it removes function blocks, and I had 
trouble doing so…

Harbs

> On Jun 18, 2018, at 7:44 AM, Harbs  wrote:
> 
>> I'm unclear as to what the desired JS output really should be.  Would it 
>> really work in JS if the function was directly assigned to a slot on the 
>> instance instead of a temporary variable first?  If so why?
> 
> Yes. Because it’s a reference to an instance variable function “cal"l can 
> replace “this” in that case.
> 
>> I'm also surprised that in JS, a function call can't have its 'this' pointer 
>> reassigned by Function.call.  What is the actual JS that is running?
> 
> Struct.prototype.decode = function(stream, parent, length) {
>  var res, _ref;
>  if (length == null) {
>length = 0;
>  }
>  res = this._setup(stream, parent, length);
>  this._parseFields(stream, res, this.fields);
>  if ((_ref = this.process) != null) {
>_ref.call(res, stream);
>  }
>  return res;
> };
> 
> _ref.call(res, stream) did not work because despite res being passed into the 
> function, “this” remained the global this in the static function.
> 
> I’m really not sure why passing in this does not work on static functions. I 
> was surprised myself.
> 
> FWIW, I rewrote the code to avoid using “this”, but it’s probably not a bad 
> idea to fix this if possible…
> 
> Harbs
> 
>> On Jun 18, 2018, at 7:09 AM, Alex Harui  wrote:
>> 
>> Without actually looking at the compiler, I think that functions that are 
>> not methods are pulled out and declared early for ES5 (strict?) reasons.  
>> I'm not sure there is a good distinction between a "local function" and 
>> assigning a function to something.
>> 
>> IIRC, "assigning" some functions like in a function as a parameter like 
>> addEventListener is supposed to generate Language.closure wrappers to make a 
>> "closure" and bind the 'this' pointer to the method.
>> 
>> I'm unclear as to what the desired JS output really should be.  Would it 
>> really work in JS if the function was directly assigned to a slot on the 
>> instance instead of a temporary variable first?  If so why?
>> 
>> I'm also surprised that in JS, a function call can't have its 'this' pointer 
>> reassigned by Function.call.  What is the actual JS that is running?
>> 
>> -Alex
>> 
>> On 6/17/18, 7:29 AM, "Harbs"  wrote:
>> 
>>   An additional related problem:
>> 
>>   Using “call” with a different “this” will not work with the aliased 
>> functions either.
>> 
>>   This is proving to be a challenge for me…
>> 
>>   Harbs
>> 
>>> On Jun 17, 2018, at 12:02 PM, Harbs  wrote:
>>> 
>>> I have the following class:
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fr7Ek=02%7C01%7Caharui%40adobe.com%7Cd50a81aaa8f8453ae0f408d5d45eb567%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636648425616368813=5Jz5bTTwhdwweaam%2BghkMCSwkM4WWyqnWHhr%2BrDpub8%3D=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fr7Ek=02%7C01%7Caharui%40adobe.com%7Cd50a81aaa8f8453ae0f408d5d45eb567%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636648425616368813=5Jz5bTTwhdwweaam%2BghkMCSwkM4WWyqnWHhr%2BrDpub8%3D=0>
>>> 
>>> Which gets cross-compiled to:
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F

Re: MD5 [was: Re: BinaryData and odd bytes]

2018-06-22 Thread Harbs
In Flash, the error is ReferenceError: Error: 1069.

I took another look and it looks like the problem is the bracketed access to 
the BinaryData.

The code s[ i / 8 ] needs to be changed to either s.readByteAt(i/8) or 
s.array[i/8].

Making either of these changes fixed the Flash error, but did not fix the JS 
error:
expected 80338e79d2ca9b9c090ebaaa2ef293c7 but was: 
996f93cb21f81b54962909fd0ea18074

I’m guessing that the problem is related to the comment here in the JS MD5 
implementation:

* Add integers, wrapping at 2^32. This uses 16-bit operations 
internally
* to work around bugs in some JS interpreters.

I think part of the problem is that JS only has 32 bit ints. I did not follow 
this article completely, but this might shed some light:
http://blog.vjeux.com/2013/javascript/conversion-from-uint8-to-int8-x-24.html 
<http://blog.vjeux.com/2013/javascript/conversion-from-uint8-to-int8-x-24.html>

Harbs

> On Jun 22, 2018, at 9:22 AM, Alex Harui  wrote:
> 
> On 6/21/18, 11:20 AM, "Harbs"  wrote:
> 
>The MD5 test actually failed in Flash too. Although the error was 
> different.
> 
>I’m not sure why it was failing. I’m pretty sure the code was the same as 
> the Flex version with ByteArray swapped for BinaryData.
> 
> Even more bothersome.  We really should dig deeper on this.  We can't have 
> other people's business logic have similar issues.  Any volunteers?
> 
> -Alex
> 
> 



Re: ***UNCHECKED*** Re: Trouble building compiler

2018-07-26 Thread Harbs
I’m running ant all from royale-asjs.

I’m not sure when I’m going to have the time to work on this, but I’ll look 
into it more when I do…

> On Jul 26, 2018, at 10:35 AM, Alex Harui  wrote:
> 
> If you don't get errors in the output for compiling the Date tests without 
> the Flash variables, that implies that an older compiler is running.  The 
> latest should be picking up the field-readonly and result in those compile 
> errors in the console output, but since the compile errors are expected that 
> should not result in a failure.  The failure might be something else like 
> some sensitivity to your time zone.  So check the junit-reports file and see 
> what it says failed if you can reproduce it.
> 
> Same for typedefs.  It seems like you aren't running the latest compiler.  
> Are you just running "ant" from royale-typedefs?  Maybe it is picking up the 
> jars from royale-asjs that haven't been updated yet.  You can add some  
> statements to the js/build.xml and see what ROYALE_TRANSPILER_HOME is 
> calculated to be.
> 
> HTH,
> -Alex
> 
> On 7/25/18, 11:12 PM, "Harbs"  wrote:
> 
> 
>> On Jul 26, 2018, at 2:55 AM, Alex Harui  wrote:
>> 
>> I took a closer look.  If you are getting ASDateTest failures, you will need 
>> to open compiler/target/junit-reports/TEST-as.ASDateTests.xml and see what 
>> the failure is.  The compile errors in the output are expected and should 
>> not cause test failures.
> 
>I’ll try to look at this again. I was only getting the errors when I 
> compile with the Flash environment variables.
> 
>> If you are having a problem with field-readonly, it implies that the 
>> compiler you are using is stale.  
>> compiler-externc/src/main/java/org/apache/royale/compiler/clients/ExternCConfiguration.java
>>  should contain an entry for field-readonly.
> 
>My source does contain the entry. That’s what’s really weird. I confirmed 
> that externs was wiped and regenerated when I compile. Is there some file I 
> might be missing?
> 
>> 
>> HTH,
>> -Alex
>> 
>> On 7/25/18, 12:52 AM, "Harbs"  wrote:
>> 
>>   I rolled back royale-typedefs to before the Date changes to enable my 
>> compilation. It does seem to me like we need to figure this out though…
>> 
>>   Harbs
>> 
>>> On Jul 25, 2018, at 9:59 AM, Harbs  wrote:
>>> 
>>> I tried without environment vars and that might have made a difference. I’ 
>>> using these normally:
>>> 
>>> export ROYALE_COMPILER_REPO=/Apache/royale-compiler
>>> export AIR_HOME=/Apache/frameworks/AIRSDK_Compiler
>>> export PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player 
>>> export FLASHPLAYER_DEBUGGER=/Apache/frameworks/Flash\ Player\ 
>>> Debugger.app/Contents/MacOS/Flash\ Player\ Debugger
>>> export ROYALE_HOME=/Apache/royale-asjs
>>> 
>>> I’m now getting field-readonly error again… :-(
>>> 
>>>> On Jul 25, 2018, at 9:52 AM, Harbs  wrote:
>>>> 
>>>> Weird. I ran ant all again and it’s no longer getting this error, but it’s 
>>>> failing again on the Date tests (4 failures).
>>>> 
>>>>> On Jul 25, 2018, at 9:43 AM, Harbs >>>> <mailto:harbs.li...@gmail.com>> wrote:
>>>>> 
>>>>> Yes I did, but it looks like that does not clear the files in the 
>>>>> typedefs repo.
>>>>> 
>>>>> I just manually deleted all the target folders in typedefs and now I’m 
>>>>> getting a new error:
>>>>> 
>>>>> externc:
>>>>>   [java] Unknown tag:field-readonly
>>>>>   [java] 0.362347459 seconds
>>>>>   [java] 
>>>>> org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
>>>>>  line='178', 
>>>>> source='/Apache/royale-typedefs/js/src/main/config/externc-config.xml'].
>>>>>   [java] /Apache/royale-typedefs/js/src/main/config/externc-config.xml 
>>>>> (line: 178)
>>>>> 
>>>>> Where is field-readonly supposed to be defined?
>>>>> 
>>>>>> On Jul 24, 2018, at 8:58 PM, Alex Harui >>>>> <mailto:aha...@adobe.com.INVALID>> wrote:
>>>>>> 
>>>>>> Did you run "ant wipe-all" in royale-compiler?
>>>>>> 
>>>>>> On 7/24/18, 10:47 AM, "Harbs" >>>>> <mailto:harbs.li...@gmail.com>> wrote:
>>>>>> 
>>>>>&

Re: Trouble building compiler

2018-07-25 Thread Harbs
Yes I did, but it looks like that does not clear the files in the typedefs repo.

I just manually deleted all the target folders in typedefs and now I’m getting 
a new error:

externc:
 [java] Unknown tag:field-readonly
 [java] 0.362347459 seconds
 [java] 
org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
 line='178', 
source='/Apache/royale-typedefs/js/src/main/config/externc-config.xml'].
 [java] /Apache/royale-typedefs/js/src/main/config/externc-config.xml 
(line: 178)

Where is field-readonly supposed to be defined?

> On Jul 24, 2018, at 8:58 PM, Alex Harui  wrote:
> 
> Did you run "ant wipe-all" in royale-compiler?
> 
> On 7/24/18, 10:47 AM, "Harbs"  wrote:
> 
>I’m currently getting the following errors:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>  
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>
> 
>It looks like the Date tests are causing problems. Any ideas why?
> 
>Harbs
> 



Re: Trouble building compiler

2018-07-25 Thread Harbs
Weird. I ran ant all again and it’s no longer getting this error, but it’s 
failing again on the Date tests (4 failures).

> On Jul 25, 2018, at 9:43 AM, Harbs  wrote:
> 
> Yes I did, but it looks like that does not clear the files in the typedefs 
> repo.
> 
> I just manually deleted all the target folders in typedefs and now I’m 
> getting a new error:
> 
> externc:
>  [java] Unknown tag:field-readonly
>  [java] 0.362347459 seconds
>  [java] 
> org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
>  line='178', 
> source='/Apache/royale-typedefs/js/src/main/config/externc-config.xml'].
>  [java] /Apache/royale-typedefs/js/src/main/config/externc-config.xml 
> (line: 178)
> 
> Where is field-readonly supposed to be defined?
> 
>> On Jul 24, 2018, at 8:58 PM, Alex Harui > <mailto:aha...@adobe.com.INVALID>> wrote:
>> 
>> Did you run "ant wipe-all" in royale-compiler?
>> 
>> On 7/24/18, 10:47 AM, "Harbs" > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>>I’m currently getting the following errors:
>>
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>>
>> 
>>It looks like the Date tests are causing problems. Any ideas why?
>> 
>>Harbs
>> 
> 



***UNCHECKED*** Re: Trouble building compiler

2018-07-25 Thread Harbs
I tried without environment vars and that might have made a difference. I’ 
using these normally:

export ROYALE_COMPILER_REPO=/Apache/royale-compiler
export AIR_HOME=/Apache/frameworks/AIRSDK_Compiler
export PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player 
export FLASHPLAYER_DEBUGGER=/Apache/frameworks/Flash\ Player\ 
Debugger.app/Contents/MacOS/Flash\ Player\ Debugger
export ROYALE_HOME=/Apache/royale-asjs

I’m now getting field-readonly error again… :-(

> On Jul 25, 2018, at 9:52 AM, Harbs  wrote:
> 
> Weird. I ran ant all again and it’s no longer getting this error, but it’s 
> failing again on the Date tests (4 failures).
> 
>> On Jul 25, 2018, at 9:43 AM, Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>> Yes I did, but it looks like that does not clear the files in the typedefs 
>> repo.
>> 
>> I just manually deleted all the target folders in typedefs and now I’m 
>> getting a new error:
>> 
>> externc:
>>  [java] Unknown tag:field-readonly
>>  [java] 0.362347459 seconds
>>  [java] 
>> org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
>>  line='178', 
>> source='/Apache/royale-typedefs/js/src/main/config/externc-config.xml'].
>>  [java] /Apache/royale-typedefs/js/src/main/config/externc-config.xml 
>> (line: 178)
>> 
>> Where is field-readonly supposed to be defined?
>> 
>>> On Jul 24, 2018, at 8:58 PM, Alex Harui >> <mailto:aha...@adobe.com.INVALID>> wrote:
>>> 
>>> Did you run "ant wipe-all" in royale-compiler?
>>> 
>>> On 7/24/18, 10:47 AM, "Harbs" >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>>I’m currently getting the following errors:
>>>
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>>
>>> 
>>>It looks like the Date tests are causing problems. Any ideas why?
>>> 
>>>Harbs
>>> 
>> 
> 



Re: ***UNCHECKED*** Re: Trouble building compiler

2018-07-25 Thread Harbs
I rolled back royale-typedefs to before the Date changes to enable my 
compilation. It does seem to me like we need to figure this out though…

Harbs

> On Jul 25, 2018, at 9:59 AM, Harbs  wrote:
> 
> I tried without environment vars and that might have made a difference. I’ 
> using these normally:
> 
> export ROYALE_COMPILER_REPO=/Apache/royale-compiler
> export AIR_HOME=/Apache/frameworks/AIRSDK_Compiler
> export PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player 
> export FLASHPLAYER_DEBUGGER=/Apache/frameworks/Flash\ Player\ 
> Debugger.app/Contents/MacOS/Flash\ Player\ Debugger
> export ROYALE_HOME=/Apache/royale-asjs
> 
> I’m now getting field-readonly error again… :-(
> 
>> On Jul 25, 2018, at 9:52 AM, Harbs  wrote:
>> 
>> Weird. I ran ant all again and it’s no longer getting this error, but it’s 
>> failing again on the Date tests (4 failures).
>> 
>>> On Jul 25, 2018, at 9:43 AM, Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>> Yes I did, but it looks like that does not clear the files in the typedefs 
>>> repo.
>>> 
>>> I just manually deleted all the target folders in typedefs and now I’m 
>>> getting a new error:
>>> 
>>> externc:
>>> [java] Unknown tag:field-readonly
>>> [java] 0.362347459 seconds
>>> [java] 
>>> org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
>>>  line='178', 
>>> source='/Apache/royale-typedefs/js/src/main/config/externc-config.xml'].
>>> [java] /Apache/royale-typedefs/js/src/main/config/externc-config.xml 
>>> (line: 178)
>>> 
>>> Where is field-readonly supposed to be defined?
>>> 
>>>> On Jul 24, 2018, at 8:58 PM, Alex Harui >>> <mailto:aha...@adobe.com.INVALID>> wrote:
>>>> 
>>>> Did you run "ant wipe-all" in royale-compiler?
>>>> 
>>>> On 7/24/18, 10:47 AM, "Harbs" >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> 
>>>>   I’m currently getting the following errors:
>>>>   
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>>>  
>>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>
>>>>  
>>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0
>>>>  
>>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F3Wpgdata=02%7C01%7Caharui%40adobe.com%7Cae7cd23df8204531b26108d5f18d8d46%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636680512616417047sdata=SjmjSTlfL3tBEAHR7o%2FEx4akD7LhTx0QQqk3w1Bkt%2F0%3Dreserved=0>>
>>>> 
>>>>   It looks like the Date tests are causing problems. Any ideas why?
>>>> 
>>>>   Harbs
>>>> 
>>> 
>> 
> 



Re: Any ideas why I'm not able to build the compiler?

2018-08-06 Thread Harbs
Here’s the output we’re both getting.

I’m guessing it has to do with the timezone we’re both in (and maybe the time 
of day?)…

https://paste.apache.org/eri2 

I’m having trouble following exactly what these tests are doing.

> On Aug 6, 2018, at 10:07 AM, Alex Harui  wrote:
> 
> as.ASDateTests.xml



Re: Any ideas why I'm not able to build the compiler?

2018-08-06 Thread Harbs
Figured it out…

Positive GMT-relative timezones were not working. I just committed a fix for 
this.

> On Aug 6, 2018, at 10:35 AM, Harbs  wrote:
> 
> Here’s the output we’re both getting.
> 
> I’m guessing it has to do with the timezone we’re both in (and maybe the time 
> of day?)…
> 
> https://paste.apache.org/eri2 <https://paste.apache.org/eri2>
> 
> I’m having trouble following exactly what these tests are doing.
> 
>> On Aug 6, 2018, at 10:07 AM, Alex Harui > <mailto:aha...@adobe.com.INVALID>> wrote:
>> 
>> as.ASDateTests.xml
> 



Re: XML filters broke

2018-08-08 Thread Harbs
It looks like we have duplicate classes in Storage and Network. I think we need 
to pick which package these classes belong in.


> On Aug 9, 2018, at 12:38 AM, Alex Harui  wrote:
> 
> There's an IDataInput/IDataOutput in the Network.swc in the develop branch 
> that would be useful to have in the feature/MXRoyale branch.  I don't want to 
> stop to do a full merge right now.
> 
> -Alex
> 
> On 8/8/18, 2:36 PM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>What’s the issue with IDataInput/IDataOutput? Cherrypicked from where?
> 
>> On Aug 8, 2018, at 11:48 PM, Alex Harui  wrote:
>> 
>> Won’t know until we try it.  I'll adjust XMLList as needed.  I have an 
>> actual test case with Tour De Flex to work with.
>> 
>> If you have time to cherrypick IDataInput/IDataOutput for our users that 
>> would be helpful.
>> 
>> Thanks,
>> -Alex
>> 
>> On 8/8/18, 1:31 PM, "Harbs"  wrote:
>> 
>>   Are you sure the logic to reassign this will work here?
>> 
>>   I’m willing to rewrite the code in XMLList to use call if you think it’ll 
>> make things easier in the compiler…
>> 
>>> On Aug 8, 2018, at 11:03 PM, Alex Harui  wrote:
>>> 
>>> 
>>> 
>>> On 8/8/18, 12:59 AM, "Harbs" >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>>  Does “this” in call/apply even work for a function which is not a 
>>> prototype function? I thought in that case “this” is the global context.
>>> 
>>> From my testing, the 'this' can be re-assigned as we want it.
>>> 
>>>  I think 6a is kind of ambiguous. Why do you think there’s a difference 
>>> between the following (other than avoiding ambiguous this references)?
>>> 
>>> Because there is already code that distinguishes when 'this' is supposed to 
>>> be used.  So we should use it instead of crafting a whole other set of code 
>>> that has a more difficult problem to solve, like whether an expression is 
>>> relative to a parameter and if so, which parameter?
>>> 
>>> My 2 cents,
>>> -Alex
>>> 
>>>  function() { return (over40(parseInt(this.age))) }
>>>  and 
>>>  function(node) { return (over40(parseInt(node.age))) }
>>> 
>>>  Although in fact, I think it would need to be:
>>> 
>>>  function(node) { return (over40(parseInt(node.child(“age” }
>>> 
>>>> On Aug 8, 2018, at 10:33 AM, Alex Harui  wrote:
>>>> 
>>>> EmitterUtils.writeThis seems to be working ok.  I think it would be 
>>>> better/correct to use it here.  I'm not sure if node as a parameter 
>>>> creates the same scope chain as node being the this pointer.  I think no, 
>>>> I don't think parameters are involved in lexical scoping.   IMO, 6a in the 
>>>> spec is saying we should make node the 'this' pointer in JS.
>>>> 
>>>> My 2 cents,
>>>> -Alex
>>>> 
>>>> On 8/7/18, 10:54 AM, "Harbs"  wrote:
>>>> 
>>>> I’m not following you. Wouldn’t we need the same logic to figure out where 
>>>> to insert “this”? I’m not sure what practical difference there would be 
>>>> between “node" and “this”, other than using apply or call. Passing in the 
>>>> XML node seems cleaner to me.
>>>> 
>>>>> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
>>>>> 
>>>>> Yup.  After thinking about it some more, it occurs to me that we took the 
>>>>> wrong starting point.  Right now code like:
>>>>> 
>>>>> over40(parseInt(age))
>>>>> 
>>>>> Results in:
>>>>> 
>>>>> function(node) { return (over40(parseInt(age))) }
>>>>> 
>>>>> And then the XML filter calls that function passing itself in as the node.
>>>>> 
>>>>> And this discussion has been about trying to figure out where to add the 
>>>>> "node" parameter.  But now I think that 6a in the spec is really saying 
>>>>> that the 'this' pointer should be the node.  We should transpile that 
>>>>> filter expression like any other function body but assume it is a 
>>>>> function run in the context of the node, like a new method on 
>>>>> XML/XMLList, or maybe more like an anonymous function.
>>>>> 
>>>>> So if I'm right, then the output should be:
>>>>> 
>>>>> fu

Re: XML filters broke

2018-08-08 Thread Harbs
Are you sure the logic to reassign this will work here?

I’m willing to rewrite the code in XMLList to use call if you think it’ll make 
things easier in the compiler…

> On Aug 8, 2018, at 11:03 PM, Alex Harui  wrote:
> 
> 
> 
> On 8/8/18, 12:59 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>Does “this” in call/apply even work for a function which is not a 
> prototype function? I thought in that case “this” is the global context.
> 
> From my testing, the 'this' can be re-assigned as we want it.
> 
>I think 6a is kind of ambiguous. Why do you think there’s a difference 
> between the following (other than avoiding ambiguous this references)?
> 
> Because there is already code that distinguishes when 'this' is supposed to 
> be used.  So we should use it instead of crafting a whole other set of code 
> that has a more difficult problem to solve, like whether an expression is 
> relative to a parameter and if so, which parameter?
> 
> My 2 cents,
> -Alex
> 
>function() { return (over40(parseInt(this.age))) }
>and 
>function(node) { return (over40(parseInt(node.age))) }
> 
>Although in fact, I think it would need to be:
> 
>function(node) { return (over40(parseInt(node.child(“age” }
> 
>> On Aug 8, 2018, at 10:33 AM, Alex Harui  wrote:
>> 
>> EmitterUtils.writeThis seems to be working ok.  I think it would be 
>> better/correct to use it here.  I'm not sure if node as a parameter creates 
>> the same scope chain as node being the this pointer.  I think no, I don't 
>> think parameters are involved in lexical scoping.   IMO, 6a in the spec is 
>> saying we should make node the 'this' pointer in JS.
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 8/7/18, 10:54 AM, "Harbs"  wrote:
>> 
>>   I’m not following you. Wouldn’t we need the same logic to figure out where 
>> to insert “this”? I’m not sure what practical difference there would be 
>> between “node" and “this”, other than using apply or call. Passing in the 
>> XML node seems cleaner to me.
>> 
>>> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
>>> 
>>> Yup.  After thinking about it some more, it occurs to me that we took the 
>>> wrong starting point.  Right now code like:
>>> 
>>> over40(parseInt(age))
>>> 
>>> Results in:
>>> 
>>> function(node) { return (over40(parseInt(age))) }
>>> 
>>> And then the XML filter calls that function passing itself in as the node.
>>> 
>>> And this discussion has been about trying to figure out where to add the 
>>> "node" parameter.  But now I think that 6a in the spec is really saying 
>>> that the 'this' pointer should be the node.  We should transpile that 
>>> filter expression like any other function body but assume it is a function 
>>> run in the context of the node, like a new method on XML/XMLList, or maybe 
>>> more like an anonymous function.
>>> 
>>> So if I'm right, then the output should be:
>>> 
>>> function() { return (over40(parseInt(this.age))) }
>>> 
>>> This is what the transpiler would have output if you had subclassed XML and 
>>> added this method to it.  And then the code in XML.SWC that applies the 
>>> filter has to use Function.apply/call passing the node as the 'this' 
>>> pointer.
>>> 
>>> If we do that, then the EmitterUtils.writeE4xFilterNode would go away, and 
>>> JSRoyaleEmitter.emitE4xFilter would temporarily change the 
>>> model.currentClass and maybe a few other things to reference an XML object.
>>> 
>>> Thoughts?
>>> -Alex
>>> 
>>> PS: Regarding adding tests, the filter tests have two variables.  "var a" 
>>> sets up the XML, "var b" is the result of the filter.  getVariable returns 
>>> the nodes for "a" then we go get child(1) which is "b" and then emit it to 
>>> see what we get.
>>> 
>>> On 8/7/18, 3:51 AM, "Harbs" >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>>  I’m also pretty sure that the following from Mozilla’s page[1] will not 
>>> work correctly:
>>> 
>>>  var people = 
>>>
>>>  Bob
>>>  32
>>>
>>>
>>>  Joe
>>>  46
>>>
>>>  ;
>>> 
>>>  function over40(i) {
>>>  return i > 40;
>>>  }
>>> 
>>>  alert(people.person.(over40(parseInt(age))).na

Re: XML filters broke

2018-08-08 Thread Harbs
What’s the issue with IDataInput/IDataOutput? Cherrypicked from where?

> On Aug 8, 2018, at 11:48 PM, Alex Harui  wrote:
> 
> Won’t know until we try it.  I'll adjust XMLList as needed.  I have an actual 
> test case with Tour De Flex to work with.
> 
> If you have time to cherrypick IDataInput/IDataOutput for our users that 
> would be helpful.
> 
> Thanks,
> -Alex
> 
> On 8/8/18, 1:31 PM, "Harbs"  wrote:
> 
>Are you sure the logic to reassign this will work here?
> 
>I’m willing to rewrite the code in XMLList to use call if you think it’ll 
> make things easier in the compiler…
> 
>> On Aug 8, 2018, at 11:03 PM, Alex Harui  wrote:
>> 
>> 
>> 
>> On 8/8/18, 12:59 AM, "Harbs" > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>>   Does “this” in call/apply even work for a function which is not a 
>> prototype function? I thought in that case “this” is the global context.
>> 
>> From my testing, the 'this' can be re-assigned as we want it.
>> 
>>   I think 6a is kind of ambiguous. Why do you think there’s a difference 
>> between the following (other than avoiding ambiguous this references)?
>> 
>> Because there is already code that distinguishes when 'this' is supposed to 
>> be used.  So we should use it instead of crafting a whole other set of code 
>> that has a more difficult problem to solve, like whether an expression is 
>> relative to a parameter and if so, which parameter?
>> 
>> My 2 cents,
>> -Alex
>> 
>>   function() { return (over40(parseInt(this.age))) }
>>   and 
>>   function(node) { return (over40(parseInt(node.age))) }
>> 
>>   Although in fact, I think it would need to be:
>> 
>>   function(node) { return (over40(parseInt(node.child(“age” }
>> 
>>> On Aug 8, 2018, at 10:33 AM, Alex Harui  wrote:
>>> 
>>> EmitterUtils.writeThis seems to be working ok.  I think it would be 
>>> better/correct to use it here.  I'm not sure if node as a parameter creates 
>>> the same scope chain as node being the this pointer.  I think no, I don't 
>>> think parameters are involved in lexical scoping.   IMO, 6a in the spec is 
>>> saying we should make node the 'this' pointer in JS.
>>> 
>>> My 2 cents,
>>> -Alex
>>> 
>>> On 8/7/18, 10:54 AM, "Harbs"  wrote:
>>> 
>>>  I’m not following you. Wouldn’t we need the same logic to figure out where 
>>> to insert “this”? I’m not sure what practical difference there would be 
>>> between “node" and “this”, other than using apply or call. Passing in the 
>>> XML node seems cleaner to me.
>>> 
>>>> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
>>>> 
>>>> Yup.  After thinking about it some more, it occurs to me that we took the 
>>>> wrong starting point.  Right now code like:
>>>> 
>>>> over40(parseInt(age))
>>>> 
>>>> Results in:
>>>> 
>>>> function(node) { return (over40(parseInt(age))) }
>>>> 
>>>> And then the XML filter calls that function passing itself in as the node.
>>>> 
>>>> And this discussion has been about trying to figure out where to add the 
>>>> "node" parameter.  But now I think that 6a in the spec is really saying 
>>>> that the 'this' pointer should be the node.  We should transpile that 
>>>> filter expression like any other function body but assume it is a function 
>>>> run in the context of the node, like a new method on XML/XMLList, or maybe 
>>>> more like an anonymous function.
>>>> 
>>>> So if I'm right, then the output should be:
>>>> 
>>>> function() { return (over40(parseInt(this.age))) }
>>>> 
>>>> This is what the transpiler would have output if you had subclassed XML 
>>>> and added this method to it.  And then the code in XML.SWC that applies 
>>>> the filter has to use Function.apply/call passing the node as the 'this' 
>>>> pointer.
>>>> 
>>>> If we do that, then the EmitterUtils.writeE4xFilterNode would go away, and 
>>>> JSRoyaleEmitter.emitE4xFilter would temporarily change the 
>>>> model.currentClass and maybe a few other things to reference an XML object.
>>>> 
>>>> Thoughts?
>>>> -Alex
>>>> 
>>>> PS: Regarding adding tests, the filter tests have two variables.  "var a" 
>>>> sets up the XML, "var b" is

Re: XML filters broke

2018-08-08 Thread Harbs
OK. I think I cherry-picked the files, although there were some conflicts. I 
hope I resolved them correctly.

> On Aug 9, 2018, at 12:45 AM, Alex Harui  wrote:
> 
> The ones in Storage seem to have very different APIs that the flash versions 
> and are in a different package.  I'm not sure it is worth worrying about 
> right now.
> 
> AIUI, the ones in Network are intended to mimic the flash versions and are 
> what our users are looking for.
> 
> My 2 cents,
> -Alex
> 
> On 8/8/18, 2:43 PM, "Harbs"  wrote:
> 
>It looks like we have duplicate classes in Storage and Network. I think we 
> need to pick which package these classes belong in.
> 
> 
>> On Aug 9, 2018, at 12:38 AM, Alex Harui  wrote:
>> 
>> There's an IDataInput/IDataOutput in the Network.swc in the develop branch 
>> that would be useful to have in the feature/MXRoyale branch.  I don't want 
>> to stop to do a full merge right now.
>> 
>> -Alex
>> 
>> On 8/8/18, 2:36 PM, "Harbs" > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>>   What’s the issue with IDataInput/IDataOutput? Cherrypicked from where?
>> 
>>> On Aug 8, 2018, at 11:48 PM, Alex Harui  wrote:
>>> 
>>> Won’t know until we try it.  I'll adjust XMLList as needed.  I have an 
>>> actual test case with Tour De Flex to work with.
>>> 
>>> If you have time to cherrypick IDataInput/IDataOutput for our users that 
>>> would be helpful.
>>> 
>>> Thanks,
>>> -Alex
>>> 
>>> On 8/8/18, 1:31 PM, "Harbs"  wrote:
>>> 
>>>  Are you sure the logic to reassign this will work here?
>>> 
>>>  I’m willing to rewrite the code in XMLList to use call if you think it’ll 
>>> make things easier in the compiler…
>>> 
>>>> On Aug 8, 2018, at 11:03 PM, Alex Harui  wrote:
>>>> 
>>>> 
>>>> 
>>>> On 8/8/18, 12:59 AM, "Harbs" >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> 
>>>> Does “this” in call/apply even work for a function which is not a 
>>>> prototype function? I thought in that case “this” is the global context.
>>>> 
>>>> From my testing, the 'this' can be re-assigned as we want it.
>>>> 
>>>> I think 6a is kind of ambiguous. Why do you think there’s a difference 
>>>> between the following (other than avoiding ambiguous this references)?
>>>> 
>>>> Because there is already code that distinguishes when 'this' is supposed 
>>>> to be used.  So we should use it instead of crafting a whole other set of 
>>>> code that has a more difficult problem to solve, like whether an 
>>>> expression is relative to a parameter and if so, which parameter?
>>>> 
>>>> My 2 cents,
>>>> -Alex
>>>> 
>>>> function() { return (over40(parseInt(this.age))) }
>>>> and 
>>>> function(node) { return (over40(parseInt(node.age))) }
>>>> 
>>>> Although in fact, I think it would need to be:
>>>> 
>>>> function(node) { return (over40(parseInt(node.child(“age” }
>>>> 
>>>>> On Aug 8, 2018, at 10:33 AM, Alex Harui  wrote:
>>>>> 
>>>>> EmitterUtils.writeThis seems to be working ok.  I think it would be 
>>>>> better/correct to use it here.  I'm not sure if node as a parameter 
>>>>> creates the same scope chain as node being the this pointer.  I think no, 
>>>>> I don't think parameters are involved in lexical scoping.   IMO, 6a in 
>>>>> the spec is saying we should make node the 'this' pointer in JS.
>>>>> 
>>>>> My 2 cents,
>>>>> -Alex
>>>>> 
>>>>> On 8/7/18, 10:54 AM, "Harbs"  wrote:
>>>>> 
>>>>> I’m not following you. Wouldn’t we need the same logic to figure out 
>>>>> where to insert “this”? I’m not sure what practical difference there 
>>>>> would be between “node" and “this”, other than using apply or call. 
>>>>> Passing in the XML node seems cleaner to me.
>>>>> 
>>>>>> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
>>>>>> 
>>>>>> Yup.  After thinking about it some more, it occurs to me that we took 
>>>>>> the wrong starting point.  Right now code like:
>>>>>> 
>>>>>> over40(parseInt(age))
>&g

XML filters broke

2018-08-06 Thread Harbs
var folderFolders:XMLList = assetXML.folder.(child('key').indexOf(folder.key) 
== 0);
var folderImages:XMLList = assetXML.image.(child('key').indexOf(folder.key) == 
0);

Is now compiled as:

var /** @type {XMLList} */ folderFolders = 
this.assetXML.child('folder').filter(function(node){return 
(node.child('key').indexOf(node.folder.key) == 0)});
var /** @type {XMLList} */ folderImages = 
this.assetXML.child('image').filter(function(node){return 
(node.child('key').indexOf(node.folder.key) == 0)});

“node.folder.key” is not correct. “folder” is a local variable of an un related 
object type.

I assume this broke with the recent XML filter changes.

Harbs

Re: XML filters broke

2018-08-07 Thread Harbs
I’m pretty sure that right now, we’d get:

function(node) { return (node.over40(parseInt(node.age))) }

Am I wrong?

> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
> 
> Right now code like:
> 
> over40(parseInt(age))
> 
> Results in:
> 
> function(node) { return (over40(parseInt(age))) }
> 
> And then the XML filter calls that function passing itself in as the node.



Re: XML filters broke

2018-08-07 Thread Harbs
Well, it looks like I was wrong.

I just tested the following in Flash, and then both give the same results (i.e. 
return the attribute):

var emp = e.employee.(@id == 1).@name; // name of employee with id 1
var foo = e.employee.(1 == @id).@name; // name of employee with id 1

> On Aug 7, 2018, at 10:27 AM, Harbs  wrote:
> 
> Your example does not seem to be right to me.
> 
> Here’s the overview of how filters are supposed to work from the spec:
> 
>> Overview
>> When the left operand evaluates to an XML object, the filtering predicate 
>> adds the left operand to the front of the scope chain of the current 
>> execution context, evaluates the Expression with the augmented scope chain, 
>> converts the result to a Boolean value, then restores the scope chain. If 
>> the result is true, the filtering predicate returns an XMLList containing 
>> the left operand. Otherwise it returns an empty XMLList.
>> When the left operand is an XMLList, the filtering predicate is applied to 
>> each XML object in the XMLList in order using the XML object as the left 
>> operand and the Expression as the right operand. It concatenates the results 
>> and returns them as a single XMLList containing all the XML properties for 
>> which the result was true. For example,
>> 
>> var john = e.employee.(name == "John"); // employees with name John
>> var twoemployees = e.employee.(@id == 0 || @id == 1); // employees with id's 
>> 0 & 1
>> var emp = e.employee.(@id == 1).name; // name of employee with id 1
>> 
>> The effect of the filtering predicate is similar to SQL’s WHERE clause or 
>> XPath’s filtering predicates.
>> For example, the statement:
>> 
>> // get the two employees with ids 0 and 1 using a predicate
>> var twoEmployees = e..employee.(@id == 0 || @id == 1);
>> 
>> produces the same result as the following set of statements:
>> // get the two employees with the ids 0 and 1 using a for loop
>> var i = 0;
>> var twoEmployees = new XMLList();
>> for each (var p in e..employee) {
>>  with (p) {
>>if (@id == 0 || @id == 1) {
>>  twoEmployees[i++] = p;
>>}
>>  }
>> }
> 
> The question is what is "the front of the scope chain of the current 
> execution context”? I’m pretty sure that means the start of sub-expressions. 
> I don’t see how that can apply to the right-hand of comparison expressions. 
> There is nothing in the spec about figuring out if a part of an expression is 
> referring to XML or XMLList.
> 
>> On Aug 7, 2018, at 9:45 AM, Alex Harui  wrote:
>> 
>> I don't get what portion of the spec has to do with whether we append "node" 
>> to various expressions.  IMO, the changes I made only affect 6b.  6a is 
>> handled by generating a function with "node" as the parameter (because node 
>> is list[i] in the spec).  The task in 6b is to correctly evaluate any e4x 
>> filter expression.  I'm not sure what the limits are on what you can have in 
>> a filter expression, but if you can have just plain "@app" anywhere in the 
>> filter expression, I don't believe scoping rules would know to apply that to 
>> the "node" parameter without generating the "node" before "@app".
>> 
>> There is a chance that the Flex Compiler was using "magic" to generate the 
>> "node" and really should have reported an error.  I do remember being told 
>> that the filter function can be "anything".  Even:
>> (var foo:int = @app.length(); foo > @bar.length())  
>> 
>> If there are actual rules in the spec about evaluating the expression, that 
>> might apply to how we handle these expressions, otherwise I think the right 
>> thing is to resolve each expression and if the expression does not resolve 
>> to anything else, assume that it applies to the node.   I know the logic in 
>> EmitterUtils.writeE4xFilterNode isn't covering all cases.  It is trying to 
>> see what the expression resolves to, and returns false for known conditions 
>> (like a member of a class).  Just make it return false for your case (and 
>> feel free to add that case to the tests).  Eventually we'll have enough 
>> cases to either call it "good enough" or figure out a better way to 
>> determine when the expression applies to "node".
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 8/6/18, 11:20 PM, "Harbs"  wrote:
>> 
>>   I just looked at the spec. I think it’s correct to append “node” to the 
>> first statement of the expression only. The only exception seems to be 
&

Re: XML filters broke

2018-08-07 Thread Harbs
I just looked at the spec. I think it’s correct to append “node” to the first 
statement of the expression only. The only exception seems to be expressions 
which use boolean expressions (i.e. || or &&) in which case each piece of the 
boolean expression should be considered a self-contained expression. So in your 
example, there are really two filter expressions:
1. hasOwnProperty("@app”)
2. @app.length() > 0

Both of those should have node appended to the front, but nothing else.

Here’s the relevant semantics in the spec (the important bit being 6a):

> 6. For i = 0 to list.[[Length]]-1
>   a. Add list[i] to the front of the scope chain
>   b. Let ref be the result of evaluating Expression using the augmented scope 
> chain of step 6a
>   c. Let match = ToBoolean(GetValue(ref))
>   d. Remove list[i] from the front of the scope chain
>   e. If (match == true), call the [[Append]] method of r with argument list[i]
> 7. Return r

Makes sense?

Harbs

> On Aug 7, 2018, at 1:39 AM, Alex Harui  wrote:
> 
> In porting Tour De Flex, there were patterns like this (explorerTree is XML):
> 
> explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)
> 
> The compiler logic before I made any changes yesterday just assumed that the 
> first expression was a reference to the node parameter but other expressions 
> were not, but it looks like the expression "@app.length()" was allowed in 
> Flex as a reference to the node.  So I think the compiler has to determine 
> what expressions evaluate to "nothing" which implies they are references to 
> the node, and what did resolve to something.  This is all new logic and I 
> don't know how to determine all of the test cases up front, so we'll have to 
> keep tuning it as we find patterns that don't work as we want them to.
> 
> In your case, if the expression resolves to a VariableDefinition, that 
> probably means that isn't a reference to node.  Not exactly sure, so you 
> should debug into it to see what the node pattern is and return false.
> 
> Thanks,
> -Alex
> 
> On 8/6/18, 3:28 PM, "Harbs"  wrote:
> 
>Doesn’t it always need to be a method for it to reference the node?
> 
>I.e. child() should be node.child(), but foo.baz would not.
> 
>> On Aug 7, 2018, at 1:12 AM, Alex Harui  wrote:
>> 
>> Yep, we need more intelligent understanding of when a reference is to the 
>> node or not.
>> 
>> Debug into EmitterUtils.writeE4xFilterNode and figure out the node pattern 
>> you need.
>> 
>> -Alex
>> 
>> On 8/6/18, 3:09 PM, "Harbs"  wrote:
>> 
>>   var folderFolders:XMLList = 
>> assetXML.folder.(child('key').indexOf(folder.key) == 0);
>>   var folderImages:XMLList = 
>> assetXML.image.(child('key').indexOf(folder.key) == 0);
>> 
>>   Is now compiled as:
>> 
>>   var /** @type {XMLList} */ folderFolders = 
>> this.assetXML.child('folder').filter(function(node){return 
>> (node.child('key').indexOf(node.folder.key) == 0)});
>>   var /** @type {XMLList} */ folderImages = 
>> this.assetXML.child('image').filter(function(node){return 
>> (node.child('key').indexOf(node.folder.key) == 0)});
>> 
>>   “node.folder.key” is not correct. “folder” is a local variable of an un 
>> related object type.
>> 
>>   I assume this broke with the recent XML filter changes.
>> 
>>   Harbs
>> 
> 
> 
> 



Re: XML filters broke

2018-08-07 Thread Harbs
Your example does not seem to be right to me.

Here’s the overview of how filters are supposed to work from the spec:

> Overview
> When the left operand evaluates to an XML object, the filtering predicate 
> adds the left operand to the front of the scope chain of the current 
> execution context, evaluates the Expression with the augmented scope chain, 
> converts the result to a Boolean value, then restores the scope chain. If the 
> result is true, the filtering predicate returns an XMLList containing the 
> left operand. Otherwise it returns an empty XMLList.
> When the left operand is an XMLList, the filtering predicate is applied to 
> each XML object in the XMLList in order using the XML object as the left 
> operand and the Expression as the right operand. It concatenates the results 
> and returns them as a single XMLList containing all the XML properties for 
> which the result was true. For example,
> 
> var john = e.employee.(name == "John"); // employees with name John
> var twoemployees = e.employee.(@id == 0 || @id == 1); // employees with id's 
> 0 & 1
> var emp = e.employee.(@id == 1).name; // name of employee with id 1
> 
> The effect of the filtering predicate is similar to SQL’s WHERE clause or 
> XPath’s filtering predicates.
> For example, the statement:
> 
> // get the two employees with ids 0 and 1 using a predicate
> var twoEmployees = e..employee.(@id == 0 || @id == 1);
> 
> produces the same result as the following set of statements:
> // get the two employees with the ids 0 and 1 using a for loop
> var i = 0;
> var twoEmployees = new XMLList();
> for each (var p in e..employee) {
>   with (p) {
> if (@id == 0 || @id == 1) {
>   twoEmployees[i++] = p;
> }
>   }
> }

The question is what is "the front of the scope chain of the current execution 
context”? I’m pretty sure that means the start of sub-expressions. I don’t see 
how that can apply to the right-hand of comparison expressions. There is 
nothing in the spec about figuring out if a part of an expression is referring 
to XML or XMLList.

> On Aug 7, 2018, at 9:45 AM, Alex Harui  wrote:
> 
> I don't get what portion of the spec has to do with whether we append "node" 
> to various expressions.  IMO, the changes I made only affect 6b.  6a is 
> handled by generating a function with "node" as the parameter (because node 
> is list[i] in the spec).  The task in 6b is to correctly evaluate any e4x 
> filter expression.  I'm not sure what the limits are on what you can have in 
> a filter expression, but if you can have just plain "@app" anywhere in the 
> filter expression, I don't believe scoping rules would know to apply that to 
> the "node" parameter without generating the "node" before "@app".
> 
> There is a chance that the Flex Compiler was using "magic" to generate the 
> "node" and really should have reported an error.  I do remember being told 
> that the filter function can be "anything".  Even:
> (var foo:int = @app.length(); foo > @bar.length())  
> 
> If there are actual rules in the spec about evaluating the expression, that 
> might apply to how we handle these expressions, otherwise I think the right 
> thing is to resolve each expression and if the expression does not resolve to 
> anything else, assume that it applies to the node.   I know the logic in 
> EmitterUtils.writeE4xFilterNode isn't covering all cases.  It is trying to 
> see what the expression resolves to, and returns false for known conditions 
> (like a member of a class).  Just make it return false for your case (and 
> feel free to add that case to the tests).  Eventually we'll have enough cases 
> to either call it "good enough" or figure out a better way to determine when 
> the expression applies to "node".
> 
> My 2 cents,
> -Alex
> 
> On 8/6/18, 11:20 PM, "Harbs"  wrote:
> 
>I just looked at the spec. I think it’s correct to append “node” to the 
> first statement of the expression only. The only exception seems to be 
> expressions which use boolean expressions (i.e. || or &&) in which case each 
> piece of the boolean expression should be considered a self-contained 
> expression. So in your example, there are really two filter expressions:
>1. hasOwnProperty("@app”)
>2. @app.length() > 0
> 
>Both of those should have node appended to the front, but nothing else.
> 
>Here’s the relevant semantics in the spec (the important bit being 6a):
> 
>> 6. For i = 0 to list.[[Length]]-1
>>  a. Add list[i] to the front of the scope chain
>>  b. Let ref be the result of evaluating Expressi

Re: XML filters broke

2018-08-08 Thread Harbs
Does “this” in call/apply even work for a function which is not a prototype 
function? I thought in that case “this” is the global context.

I think 6a is kind of ambiguous. Why do you think there’s a difference between 
the following (other than avoiding ambiguous this references)?

function() { return (over40(parseInt(this.age))) }
and 
function(node) { return (over40(parseInt(node.age))) }

Although in fact, I think it would need to be:

function(node) { return (over40(parseInt(node.child(“age” }

> On Aug 8, 2018, at 10:33 AM, Alex Harui  wrote:
> 
> EmitterUtils.writeThis seems to be working ok.  I think it would be 
> better/correct to use it here.  I'm not sure if node as a parameter creates 
> the same scope chain as node being the this pointer.  I think no, I don't 
> think parameters are involved in lexical scoping.   IMO, 6a in the spec is 
> saying we should make node the 'this' pointer in JS.
> 
> My 2 cents,
> -Alex
> 
> On 8/7/18, 10:54 AM, "Harbs"  wrote:
> 
>I’m not following you. Wouldn’t we need the same logic to figure out where 
> to insert “this”? I’m not sure what practical difference there would be 
> between “node" and “this”, other than using apply or call. Passing in the XML 
> node seems cleaner to me.
> 
>> On Aug 7, 2018, at 6:50 PM, Alex Harui  wrote:
>> 
>> Yup.  After thinking about it some more, it occurs to me that we took the 
>> wrong starting point.  Right now code like:
>> 
>> over40(parseInt(age))
>> 
>> Results in:
>> 
>> function(node) { return (over40(parseInt(age))) }
>> 
>> And then the XML filter calls that function passing itself in as the node.
>> 
>> And this discussion has been about trying to figure out where to add the 
>> "node" parameter.  But now I think that 6a in the spec is really saying that 
>> the 'this' pointer should be the node.  We should transpile that filter 
>> expression like any other function body but assume it is a function run in 
>> the context of the node, like a new method on XML/XMLList, or maybe more 
>> like an anonymous function.
>> 
>> So if I'm right, then the output should be:
>> 
>> function() { return (over40(parseInt(this.age))) }
>> 
>> This is what the transpiler would have output if you had subclassed XML and 
>> added this method to it.  And then the code in XML.SWC that applies the 
>> filter has to use Function.apply/call passing the node as the 'this' pointer.
>> 
>> If we do that, then the EmitterUtils.writeE4xFilterNode would go away, and 
>> JSRoyaleEmitter.emitE4xFilter would temporarily change the 
>> model.currentClass and maybe a few other things to reference an XML object.
>> 
>> Thoughts?
>> -Alex
>> 
>> PS: Regarding adding tests, the filter tests have two variables.  "var a" 
>> sets up the XML, "var b" is the result of the filter.  getVariable returns 
>> the nodes for "a" then we go get child(1) which is "b" and then emit it to 
>> see what we get.
>> 
>> On 8/7/18, 3:51 AM, "Harbs" > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>>   I’m also pretty sure that the following from Mozilla’s page[1] will not 
>> work correctly:
>> 
>>   var people = 
>> 
>>   Bob
>>   32
>> 
>> 
>>   Joe
>>   46
>> 
>>   ;
>> 
>>   function over40(i) {
>>   return i > 40;
>>   }
>> 
>>   alert(people.person.(over40(parseInt(age))).name); // Alerts Joe
>> 
>>   
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FArchive%2FWeb%2FE4X%2FProcessing_XML_with_E4Xdata=02%7C01%7Caharui%40adobe.com%7C47aa707c6e664beeafe308d5fc53afbd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636692358717325505sdata=I1dJz1%2BApUMPtSZNoFFWF68u1IeygB6fiIF%2FKM9zq4Y%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FArchive%2FWeb%2FE4X%2FProcessing_XML_with_E4Xdata=02%7C01%7Caharui%40adobe.com%7C47aa707c6e664beeafe308d5fc53afbd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636692358717325505sdata=I1dJz1%2BApUMPtSZNoFFWF68u1IeygB6fiIF%2FKM9zq4Y%3Dreserved=0>
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FArchive%2FWeb%2FE4X%2FProcessing_XML_with_E4Xdata=02%7C01%7Caharui%40adobe.com%7C47aa707c6e664beeafe308d5fc53afbd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636692358717325505sdata=I1dJz1%2BApUMPtSZNoFFWF68u1IeygB6fiIF%2FKM9zq4Y%3Dreserved=0
>>  
>&g

Re: ***UNCHECKED*** Re: Trouble building compiler

2018-08-06 Thread Harbs
Interesting. My variables are set without quotes, but I am escaping the spaces. 
I’m pretty sure that’s necessary in a shell script.

> On Aug 6, 2018, at 6:07 AM, Alex Harui  wrote:
> 
> FWIW, I ran into the same or similar problem today.  For me, quotes around 
> the entry in env.properties:
> FLASHPLAYER_DEBUGGER='/Users/aharui/adobe/flashplayer/11.1/Flash Player 
> Debugger.app/Contents/MacOS/Flash Player Debugger'
> 
> Resulted in the FLASHPLAYER_DEBUGGER not being found and the tests going into 
> "no-Flash" test running even though they'd been compiled with Flash 
> playerglobal.swc".  Removing the quotes resulted in the test runner finding 
> FLASHPLAYER_DEBUGGER and the tests passed again.
> 
> The output went from having quotes to not having quotes as in:
> 
> environment property - FLASHPLAYER_DEBUGGER = 
> /Users/aharui/adobe/flashplayer/11.1/Flash Player 
> Debugger.app/Contents/MacOS/Flash Player Debugger
> 
> HTH,
> -Alex
> 
> On 7/26/18, 9:15 AM, "Alex Harui"  wrote:
> 
>In general, if "ant all" fails in the compiler, try running "ant" directly 
> in royale-compiler.  Same for royale-typedefs.
> 
>HTH,
>-Alex
> 
>On 7/26/18, 2:00 AM, "Harbs"  wrote:
> 
>I’m running ant all from royale-asjs.
> 
>I’m not sure when I’m going to have the time to work on this, but I’ll 
> look into it more when I do…
> 
>> On Jul 26, 2018, at 10:35 AM, Alex Harui  wrote:
>> 
>> If you don't get errors in the output for compiling the Date tests without 
>> the Flash variables, that implies that an older compiler is running.  The 
>> latest should be picking up the field-readonly and result in those compile 
>> errors in the console output, but since the compile errors are expected that 
>> should not result in a failure.  The failure might be something else like 
>> some sensitivity to your time zone.  So check the junit-reports file and see 
>> what it says failed if you can reproduce it.
>> 
>> Same for typedefs.  It seems like you aren't running the latest compiler.  
>> Are you just running "ant" from royale-typedefs?  Maybe it is picking up the 
>> jars from royale-asjs that haven't been updated yet.  You can add some 
>>  statements to the js/build.xml and see what ROYALE_TRANSPILER_HOME is 
>> calculated to be.
>> 
>> HTH,
>> -Alex
>> 
>> On 7/25/18, 11:12 PM, "Harbs"  wrote:
>> 
>> 
>>> On Jul 26, 2018, at 2:55 AM, Alex Harui  wrote:
>>> 
>>> I took a closer look.  If you are getting ASDateTest failures, you will 
>>> need to open compiler/target/junit-reports/TEST-as.ASDateTests.xml and see 
>>> what the failure is.  The compile errors in the output are expected and 
>>> should not cause test failures.
>> 
>>   I’ll try to look at this again. I was only getting the errors when I 
>> compile with the Flash environment variables.
>> 
>>> If you are having a problem with field-readonly, it implies that the 
>>> compiler you are using is stale.  
>>> compiler-externc/src/main/java/org/apache/royale/compiler/clients/ExternCConfiguration.java
>>>  should contain an entry for field-readonly.
>> 
>>   My source does contain the entry. That’s what’s really weird. I confirmed 
>> that externs was wiped and regenerated when I compile. Is there some file I 
>> might be missing?
>> 
>>> 
>>> HTH,
>>> -Alex
>>> 
>>> On 7/25/18, 12:52 AM, "Harbs"  wrote:
>>> 
>>>  I rolled back royale-typedefs to before the Date changes to enable my 
>>> compilation. It does seem to me like we need to figure this out though…
>>> 
>>>  Harbs
>>> 
>>>> On Jul 25, 2018, at 9:59 AM, Harbs  wrote:
>>>> 
>>>> I tried without environment vars and that might have made a difference. I’ 
>>>> using these normally:
>>>> 
>>>> export ROYALE_COMPILER_REPO=/Apache/royale-compiler
>>>> export AIR_HOME=/Apache/frameworks/AIRSDK_Compiler
>>>> export PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player 
>>>> export FLASHPLAYER_DEBUGGER=/Apache/frameworks/Flash\ Player\ 
>>>> Debugger.app/Contents/MacOS/Flash\ Player\ Debugger
>>>> export ROYALE_HOME=/Apache/royale-asjs
>>>> 
>>>> I’m now getting field-readonly error again… :-(
>>>> 
>>>>> On Jul 25, 2018, at 9:52 AM, Harbs  wrote:
>>>>> 
>>>>> Weird. I ran ant all again and it’s no longer getting this e

Re: XML filters broke

2018-08-07 Thread Harbs
I’m also pretty sure that the following from Mozilla’s page[1] will not work 
correctly:

var people = 
  
Bob
32
  
  
Joe
46
  
;

function over40(i) {
return i > 40;
}

alert(people.person.(over40(parseInt(age))).name); // Alerts Joe

https://developer.mozilla.org/en-US/docs/Archive/Web/E4X/Processing_XML_with_E4X
 
<https://developer.mozilla.org/en-US/docs/Archive/Web/E4X/Processing_XML_with_E4X>

> On Aug 7, 2018, at 1:41 PM, Harbs  wrote:
> 
> OK. I fixed the issue, but there’s a couple of loose ends:
> 
> 1. I don’t know how to add unit tests for these cases. In the current unit 
> tests, I see “getNode” and “getVariable” being used. I don’t know the logic 
> in setting up tests.
> 2. I’m not quite sure what "parentNode.getChild(0)” does. What is the parent 
> node and will this cause my second case of e.employee.(1 == @id) to fail? 
> Removing the check against firstChild caused the testXMLFilterWithAttribute 
> test to fail because it prepended “node.” to “length()”.
> 
> P.S. I finally got debugging from Eclipse working on the compiler, so 
> hopefully I’ll have a much easier time fixing compiler issues in the future. 
> :-)
> 
> Thanks,
> Harbs
> 
>> On Aug 7, 2018, at 10:51 AM, Harbs  wrote:
>> 
>> Well, it looks like I was wrong.
>> 
>> I just tested the following in Flash, and then both give the same results 
>> (i.e. return the attribute):
>> 
>> var emp = e.employee.(@id == 1).@name; // name of employee with id 1
>> var foo = e.employee.(1 == @id).@name; // name of employee with id 1
>> 
>>> On Aug 7, 2018, at 10:27 AM, Harbs  wrote:
>>> 
>>> Your example does not seem to be right to me.
>>> 
>>> Here’s the overview of how filters are supposed to work from the spec:
>>> 
>>>> Overview
>>>> When the left operand evaluates to an XML object, the filtering predicate 
>>>> adds the left operand to the front of the scope chain of the current 
>>>> execution context, evaluates the Expression with the augmented scope 
>>>> chain, converts the result to a Boolean value, then restores the scope 
>>>> chain. If the result is true, the filtering predicate returns an XMLList 
>>>> containing the left operand. Otherwise it returns an empty XMLList.
>>>> When the left operand is an XMLList, the filtering predicate is applied to 
>>>> each XML object in the XMLList in order using the XML object as the left 
>>>> operand and the Expression as the right operand. It concatenates the 
>>>> results and returns them as a single XMLList containing all the XML 
>>>> properties for which the result was true. For example,
>>>> 
>>>> var john = e.employee.(name == "John"); // employees with name John
>>>> var twoemployees = e.employee.(@id == 0 || @id == 1); // employees with 
>>>> id's 0 & 1
>>>> var emp = e.employee.(@id == 1).name; // name of employee with id 1
>>>> 
>>>> The effect of the filtering predicate is similar to SQL’s WHERE clause or 
>>>> XPath’s filtering predicates.
>>>> For example, the statement:
>>>> 
>>>> // get the two employees with ids 0 and 1 using a predicate
>>>> var twoEmployees = e..employee.(@id == 0 || @id == 1);
>>>> 
>>>> produces the same result as the following set of statements:
>>>> // get the two employees with the ids 0 and 1 using a for loop
>>>> var i = 0;
>>>> var twoEmployees = new XMLList();
>>>> for each (var p in e..employee) {
>>>> with (p) {
>>>>  if (@id == 0 || @id == 1) {
>>>>twoEmployees[i++] = p;
>>>>  }
>>>> }
>>>> }
>>> 
>>> The question is what is "the front of the scope chain of the current 
>>> execution context”? I’m pretty sure that means the start of 
>>> sub-expressions. I don’t see how that can apply to the right-hand of 
>>> comparison expressions. There is nothing in the spec about figuring out if 
>>> a part of an expression is referring to XML or XMLList.
>>> 
>>>> On Aug 7, 2018, at 9:45 AM, Alex Harui  wrote:
>>>> 
>>>> I don't get what portion of the spec has to do with whether we append 
>>>> "node" to various expressions.  IMO, the changes I made only affect 6b.  
>>>> 6a is handled by generating a function with "node" as the parameter 
>>>> (because node is list[i] in the spec).  The task in 6b is to correctly 
>>>> evaluate any e

Re: XML filters broke

2018-08-07 Thread Harbs
OK. I fixed the issue, but there’s a couple of loose ends:

1. I don’t know how to add unit tests for these cases. In the current unit 
tests, I see “getNode” and “getVariable” being used. I don’t know the logic in 
setting up tests.
2. I’m not quite sure what "parentNode.getChild(0)” does. What is the parent 
node and will this cause my second case of e.employee.(1 == @id) to fail? 
Removing the check against firstChild caused the testXMLFilterWithAttribute 
test to fail because it prepended “node.” to “length()”.

P.S. I finally got debugging from Eclipse working on the compiler, so hopefully 
I’ll have a much easier time fixing compiler issues in the future. :-)

Thanks,
Harbs

> On Aug 7, 2018, at 10:51 AM, Harbs  wrote:
> 
> Well, it looks like I was wrong.
> 
> I just tested the following in Flash, and then both give the same results 
> (i.e. return the attribute):
> 
> var emp = e.employee.(@id == 1).@name; // name of employee with id 1
> var foo = e.employee.(1 == @id).@name; // name of employee with id 1
> 
>> On Aug 7, 2018, at 10:27 AM, Harbs  wrote:
>> 
>> Your example does not seem to be right to me.
>> 
>> Here’s the overview of how filters are supposed to work from the spec:
>> 
>>> Overview
>>> When the left operand evaluates to an XML object, the filtering predicate 
>>> adds the left operand to the front of the scope chain of the current 
>>> execution context, evaluates the Expression with the augmented scope chain, 
>>> converts the result to a Boolean value, then restores the scope chain. If 
>>> the result is true, the filtering predicate returns an XMLList containing 
>>> the left operand. Otherwise it returns an empty XMLList.
>>> When the left operand is an XMLList, the filtering predicate is applied to 
>>> each XML object in the XMLList in order using the XML object as the left 
>>> operand and the Expression as the right operand. It concatenates the 
>>> results and returns them as a single XMLList containing all the XML 
>>> properties for which the result was true. For example,
>>> 
>>> var john = e.employee.(name == "John"); // employees with name John
>>> var twoemployees = e.employee.(@id == 0 || @id == 1); // employees with 
>>> id's 0 & 1
>>> var emp = e.employee.(@id == 1).name; // name of employee with id 1
>>> 
>>> The effect of the filtering predicate is similar to SQL’s WHERE clause or 
>>> XPath’s filtering predicates.
>>> For example, the statement:
>>> 
>>> // get the two employees with ids 0 and 1 using a predicate
>>> var twoEmployees = e..employee.(@id == 0 || @id == 1);
>>> 
>>> produces the same result as the following set of statements:
>>> // get the two employees with the ids 0 and 1 using a for loop
>>> var i = 0;
>>> var twoEmployees = new XMLList();
>>> for each (var p in e..employee) {
>>> with (p) {
>>>   if (@id == 0 || @id == 1) {
>>> twoEmployees[i++] = p;
>>>   }
>>> }
>>> }
>> 
>> The question is what is "the front of the scope chain of the current 
>> execution context”? I’m pretty sure that means the start of sub-expressions. 
>> I don’t see how that can apply to the right-hand of comparison expressions. 
>> There is nothing in the spec about figuring out if a part of an expression 
>> is referring to XML or XMLList.
>> 
>>> On Aug 7, 2018, at 9:45 AM, Alex Harui  wrote:
>>> 
>>> I don't get what portion of the spec has to do with whether we append 
>>> "node" to various expressions.  IMO, the changes I made only affect 6b.  6a 
>>> is handled by generating a function with "node" as the parameter (because 
>>> node is list[i] in the spec).  The task in 6b is to correctly evaluate any 
>>> e4x filter expression.  I'm not sure what the limits are on what you can 
>>> have in a filter expression, but if you can have just plain "@app" anywhere 
>>> in the filter expression, I don't believe scoping rules would know to apply 
>>> that to the "node" parameter without generating the "node" before "@app".
>>> 
>>> There is a chance that the Flex Compiler was using "magic" to generate the 
>>> "node" and really should have reported an error.  I do remember being told 
>>> that the filter function can be "anything".  Even:
>>> (var foo:int = @app.length(); foo > @bar.length())  
>>> 
>>> If there are actual rules in the spec about evaluating the expression, th

Re: Migrating Enterprise Flex Application

2018-08-08 Thread Harbs
What is missing?

> On Aug 8, 2018, at 8:28 PM, Carlos Rovira  wrote:
> 
> Hi,
> 
> just notice that current versions of IDataInput and IDataOutput are
> incomplete. The rest of missed methods should be added and as well added to
> implementor classes
> 
> just my 2ctns
> 
> 2018-08-08 9:29 GMT+02:00 Alex Harui :
> 
>> In the develop branch, there is an IDataInput/IDataOutput in the Network
>> SWC.  I will try to cherry pick that into feature/MXRoyale after I finish
>> up another thing I'm currently working on.  You could probably get the
>> nightly from the develop branch and use that Network.swc.
>> 
>> HTH,
>> -Alex
>> 
>> On 8/7/18, 11:44 PM, "chembali"  wrote:
>> 
>>My current code uses IDataInput/iDataOutput classes in Flash util. What
>>classes can I use to replace them? I saw IBinaryDataOutput in Royale,
>> but it
>>does not have the writeObject() and readObject() apis.
>> 
>> 
>> 
>>--
>>Sent from: https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
>> com%2Fdata=02%7C01%7Caharui%40adobe.com%
>> 7C0673e721af074e9eb88508d5fcfa5b3f%7Cfa7b1b5a7b34438794aed2c178de
>> cee1%7C0%7C1%7C636693074577954430sdata=UVE28CmyyV975aj%
>> 2FaFaSQaxXaY30Ifd3fUx1of8ZLpM%3Dreserved=0
>> 
>> 
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: Possible compiler error

2018-08-28 Thread Harbs
I’m not sure why, but I think this is normal. (I think it’s a limitation in 
Flash.)

To use a default, you need to have the superclass support default values as 
well.

> On Aug 28, 2018, at 12:39 PM, Carlos Rovira  wrote:
> 
> I'm finding this error, and don't know if is a problem or not.
> 
> I'm introducing in this signature
> 
> protected function selectionChangeHandler(event:Event):void
> 
> a "= null"
> 
> protected function selectionChangeHandler(event:Event = null):void
> 
> And I get this error:
> 
> Error: Incompatible override.
> 
>override protected function selectionChangeHandler(event:Event =
> null):void
> 
> Is this normal? or we have a bug in the compiler. For me it seems a normal
> interface method signature but it seems params with default values are not
> supported?
> 
> If so I'll create a github issue in compiler for this
> 
> thanks
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: Possible compiler error

2018-08-28 Thread Harbs
There’s a number of places in the framework where there’s overrides with 
parameters that default to null:
ElementWrapper has: override public function 
addEventListener(type:String, handler:Function, opt_capture:Boolean = false, 
opt_handlerScope:Object = null):void
TableLeafElement has:   public override function 
getNextLeaf(limitElement:IFlowGroupElement=null):IFlowLeafElement

etc.

There must be something else going on in your case.

Harbs

> On Aug 28, 2018, at 6:57 PM, Carlos Rovira  wrote:
> 
> Hi,
> thanks for the responses, but maybe I didn't express right. I mean the
> superclass signature is in ListView
> 
> protected function selectionChangeHandler(event:Event):void
> 
> and I want to change it to have default "= null":
> 
> protected function selectionChangeHandler(event:Event = null):void
> 
> then child class (TableView) will need to be like the following override:
> 
> override protected function selectionChangeHandler(event:Event = null):void
> 
> this throws:
> 
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TableView.as(99):
> col: 31 Error: Incompatible override.
> 
>override protected function selectionChangeHandler(event:Event =
> null):void
> ^
> 
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/TableView.as(99):
> col: 31 Incompatible override.
> 
>    override protected function selectionChangeHandler(event:Event =
> null):void
> 
> If like Harbs said is an AS3 restriction is ok for me, in fact I don't need
> it now, since I took other path to make what I want.
> If is a compiler bug then we must to write an issue.
> 
> 
> 
> 
> El mar., 28 ago. 2018 a las 13:03, Olaf Krueger ()
> escribió:
> 
>> Hi Carlos,
>> as Harbs mentioned, my experience is also, that implemented interface
>> methods or overridden methods always has to be implemented with the entire
>> same signature, including optional (default parameters) and required
>> parameters.
>> 
>> From the AS3 docs regarding interfaces [1]:
>> "You also have some flexibility with default parameter values. An interface
>> definition can include function declarations with default parameter values.
>> A method that implements such a function declaration must have a default
>> parameter value that is a member of the same data type as the value
>> specified in the interface definition, but the actual value does not have
>> to
>> match"
>> 
>> Why do you think that this doesn't make sense?
>> 
>> Olaf
>> 
>> [1]
>> 
>> https://help.adobe.com/en_US/as3/learn/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f41.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f20
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://apache-royale-development.20373.n8.nabble.com/
>> 
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>> 
>> <http://apache-royale-development.20373.n8.nabble.com/>
>> 
>> 



Re: Emulation Components, Examples, Docs

2018-08-20 Thread Harbs
Thanks for the work on this. I hope folks step up to the plate here.

Personally, I’m struggling to get my head above water after summer vacation 
right now…

Harbs

> On Aug 18, 2018, at 10:39 PM, Alex Harui  wrote:
> 
> Hi Folks,
> 
> I've been making progress on migrating Tour De Flex.  The latest JS debug 
> version is here:
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/TourDeFlexMigration/lastSuccessfulBuild/artifact/examples/mxroyale/tourdeflexmodules/bin/js-debug/index.html
> 
> You can compare it to the Tour De Flex on the Apache Flex site:
> http://flex.apache.org/tourdeflex/index.html
> 
> It is not a goal to achieve pixel-for-pixel replication of Tour De Flex, and 
> we may never quite get there.  The way fonts are rendered in the SWF version 
> may be specific to Flash.  But I think you can see that it is a reasonable 
> replication of the app.  I'm on vacation for a week then I will be continuing 
> the migration, adding more of the examples.  It would be great to have others 
> help out.  There have been very few changes to the original source code.  
> Almost all of the work has been in the framework, emulation components and 
> compiler.
> 
> One thing to note in the JS version.  I commented out the Copy and Copy Link 
> buttons because they really aren't needed in the JS version.  You can just 
> select the text you want and use the browser menus to copy the source code.  
> That's something you could not do in the SWF version.
> 
> Thanks,
> -Alex
> 
> On 8/1/18, 6:01 PM, "Alex Harui"  wrote:
> 
>Hi Folks,
> 
>I've been slowly getting various emulation components to work.  More help 
> is needed here.
> 
>It occurred to me that a more complex use case would be helpful, so I 
> decided to try migrating the Tour De Flex application.  The released Tour De 
> Flex uses SWFLoader and sub-applications which are not used in the two API 
> Reports we've received, so I made a copy of Tour De Flex and replaced 
> SWFLoader and sub-Applications with ModuleLoader and Modules.  The working 
> Flex version (built by the Flex SDK) is in the flex-examples repo.
> 
>I took that code and copied it into the feature/MXRoyale branch.  It 
> exposed several compiler issues which I've fixed, and some missing APIs and 
> other minor cleanup which I've just pushed to that branch.  But now, the main 
> shell (3 MXML files) and the Welcome example compile.  Next step is to get 
> them to run, then start working on other examples.
> 
>Volunteers would be helpful to try to provide better written documentation 
> of the steps I've taken in the migration.  If you run "git log -- 
> examples/mxroyale/tourdeflexmodules" you will see the changes I've had to 
> make to the app (and skip changes to the framework).  I've tried to leave 
> useful comments on those commits.  It would save me much time if someone 
> would try to turn that into written doc so I can focus on getting the code to 
> actually run.  And later, to look reasonable.
> 
>Other volunteers would be helpful to try to migrate other examples in Tour 
> De Flex and get them to run.
> 
>Because Tour De Flex doesn't really use any 3rd party libraries, I was 
> able to get the first four MXML files to compile cleanly in relatively few 
> commits and if it weren't for me having to stop and fix compiler and 
> framework issues, that milestone would have been reached in a matter of an 
> hour or two.
> 
>Anyway, please help if you can.
> 
>Later,
>-Alex
> 
> 
> 



Re: [Discuss] Start release process 0.9.3

2018-08-27 Thread Harbs
I have found that there’s an error with ACE on multiple machines. I was only 
able to get it to build by first running ant on the typedefs repo and then the 
asjs repo succeeded.

On my Mac, it worked fine, so I’m not really sure what triggered the problem.

Maybe this is related to the failures on apacheroyaleci? Dunno…

I plan on making sure the current develop branch works for me and fixing any 
issues that might crop up in the next couple of days.

There is also some code which needs to be cherry-picked from the 
revert-refactor branch.

> On Aug 27, 2018, at 8:25 PM, Alex Harui  wrote:
> 
> I thought I'd sent an email about this, but I can't find it so I guess not.
> 
> For some reason, some weeks ago, the builds began to fail on apacheroyaleci.  
> The only way I was able to fix it was to create a Jenkins agent and move 
> builds that needed the screen (to run tests) to that agent.  In theory, 
> royale-compiler and royale-typedefs should still be able to use the master 
> build agent.  Any build issues here are probably a matter of getting the 
> right Ant variables in place.  I think it did all work at one point in time 
> after I made the agent.
> 
> That said, I think this issue is independent of any issues on build.a.o with 
> Maven.
> 
> Regarding releasing in general, I have a slight preference to wait a bit 
> until I get more of Tour De Flex working, but if I'm not the RM and don't 
> have to spend time figuring out the merge from feature/MXRoyale to develop, 
> it doesn't matter to me.  I was also pondering just releasing from 
> feature/MXRoyale.
> 
> HTH,
> -Alex
> 
> On 8/27/18, 7:03 AM, "Piotr Zarzycki"  > wrote:
> 
>I have switched two build on jenkins to "master" royale-asjs_jsonly and
>royale-asjs - It seems that this fixes issue with build. - Not sure if it
>can stay like that.
> 
>I'm working right now to fix build for module Icons.
> 
>Thanks,
>Piotr
> 
>pon., 27 sie 2018 o 15:06 Piotr Zarzycki 
>napisał(a):
> 
>> I'm going to commit some changes to build.xml, if it won't work I will
>> revert it.
>> 
>> pon., 27 sie 2018 o 14:12 Piotr Zarzycki 
>> napisał(a):
>> 
>>> I looked into the current failing build [1]. It complaining that "Basedir
>>> c:\jenkins\workspace\royale-typedefs does not exist" and it would be
>>> correct, because "royale-typedefs" is being build to that folder "C:\Program
>>> Files (x86)\Jenkins\workspace\royale-typedefs".
>>> 
>>> Does anyone changed that and why ?
>>> 
>>> [1]
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheroyaleci.westus2.cloudapp.azure.com%3A8080%2Fjob%2Froyale-asjs%2Fdata=02%7C01%7Caharui%40adobe.com%7Cdfb56180bb5e41331adc08d60c25d165%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636709753897399673sdata=n7JIKX8vjpitTAp9TH1kMxswdSN5B%2Bb6J%2FDleeRXNPc%3Dreserved=0
>>>  
>>> 
>>> 
>>> Thanks,
>>> Piotr
>>> 
>>> niedz., 26 sie 2018 o 15:11 Piotr Zarzycki >> >
>>> napisał(a):
>>> 
 I'm going to notify Infra about problem with build on b.a.o. Locally
 everything is perfectly fine. I will attach dev list and write email on
 us...@infra.apache.org .
 
 Thanks,
 Piotr
 
 pt., 24 sie 2018 o 16:05 Carlos Rovira >>> >
 napisał(a):
 
> Great Piotr!,
> 
> as you said discussion is not over, but I think we discussed almost
> lots of
> things and plans was left for releases "post 0.9.3". In fact I revert
> package name changes that was the only point that was making us not
> release
> 0.9.3. So I think we are at this point safe to release 0.9.3, 0.9.4 or
> what
> we want to call it :)
> 
> I must say that I'm this days wanting to finish some things in Jewel
> that
> will make it pretty usable in an stable way, for me that points are:
> 
> * End Jewel Table and Jewel List remove and update data
> * Jewel NumericStepper
> * Jewel DropdownList/Combobox
> 
> There's much more to do, but I think those three points will make many
> people have the minimun to start working in real Apache Royale Jewel
> apps
> (at least is what I need to start a real project we have now for Apache
> Royale, so I'm working hard to complete these points).
> I want to make this asap, so hope something of those point could go in
> this
> release :)
> 
> Best,
> 
> Carlos
> 
> 
> 
> 
> 
> 
> 
> 
> El vie., 24 ago. 2018 a las 0:35, Piotr Zarzycki (<
> 

Re: Migrating Enterprise Flex Application

2018-07-18 Thread Harbs
Some comments:

> AlivePDF.swc

You’re probably going to need some HTML-compatible library for this. Take a 
look at PDFKit https://github.com/devongovett/pdfkit 

> Cairngorm.swc
> CairngormEnterprise.swc

I’ve never used Cairngorm. I do use PureMVC and simply copying the source files 
into my project worked perfectly.

> diagrammer.swc

This seems like data visualization. You’re going to want to analyze whether it 
makes sense to migrate that code, or use some JS library.

> drumbeatinsight.swc

I don’t know what this is, but it looks like Jude’s project.

> granite.swc

Would BlazeDS be a good replacement for this?

> kap-layouts-1.6.2.swc

Don’t know what this is.

> MaskedTextInput.swc

Is this different than the Spark one? You can probably use a Royale TextInput 
with a Password bead.

> multicolumnform.swc

I’m guessing you can just lay everything out without this.

> svg-1.6.2.swc
I don’t know what this is, but Royale has pretty good SVG support.

> flex-iframe-1.4.6.swc

Royale has a “WebBrowser” component which can load iframes.

> ObjectHandles-1.0.0013.swc
Don’t know what this is.

> On Jul 18, 2018, at 9:36 AM, chembali  wrote:
> 
> I believe I have convinced the management to go with Apache Royale as part
> the Deflexing effort of our Flex applications. The first project is going to
> be very important and they are going to monitor it closely. 
> 
> I want to be realistic and figure out the best approach and I need your help
> on this. I am an enterprise java developer with working knowledge of the UI
> technologies. I understand the Flex programming model but don't have any
> hands on experience. I tried to get an emulation component working. I
> struggled. I was able to get the emulation working by cut/paste/edit with
> the Royale class implementation but this may not be the best approach.
> 
> I now realise that my developer and I don't have the necessary skillset to
> get the emulation components implemented in a timely manner. This is a huge
> risk. How can I mitigate this risk? Is it realistic to count on you guys to
> deliver the emulation components ( not sure )? Can I go with the Apache
> Royale native APIs ( Jewel, Basic, Express etc ) for the mx/spark components
> that are not emulated?
> 
> Also the 3rd party APIs used in my application are
> 
> AlivePDF.swc
> Cairngorm.swc
> CairngormEnterprise.swc
> diagrammer.swc
> drumbeatinsight.swc
> granite.swc
> kap-layouts-1.6.2.swc
> MaskedTextInput.swc
> multicolumnform.swc
> svg-1.6.2.swc
> flex-iframe-1.4.6.swc
> ObjectHandles-1.0.0013.swc
> 
> Any experience/recommendation in handling the 3rd party libraries? 
> I am working on the Prototype for the Management currently. But I was
> thinking of trying to get the Application ( all components ) compiled using
> the royale-asjs by adding stub for the missing mx/spark components. Any
> other recommendations? Again thanks a bunch for your help on this.
> 
> 
> 
> --
> Sent from: http://apache-royale-development.20373.n8.nabble.com/



Trouble building compiler

2018-07-24 Thread Harbs
I’m currently getting the following errors:
https://paste.apache.org/3Wpg <https://paste.apache.org/3Wpg>

It looks like the Date tests are causing problems. Any ideas why?

Harbs

Re: Query on Royale dependency generation

2018-07-19 Thread Harbs
That’s weird. I believe the default is false (although I think the default 
should be true).

Try setting -remove-circulars to true. I think that should resolve it.

Yes. I’m using BinaryData extensively.

> On Jul 19, 2018, at 3:15 PM, Frost, Andrew  wrote:
> 
> Hi
> 
> I'm not using it on my build command line, i.e. it's set as the default 
> 'true'.
> 
> If I do set it to 'false' then I get what I would expect from the code, i.e. 
> it ignores the interfaces and just outputs the discovered dependencies - 
> including the google one:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], ['goog.DEBUG', 
> 'org.apache.royale.utils.Endian']);
> 
> But now I get hundreds of errors from the browser's JS engine e.g. 
> IStatesObject.js:42 Uncaught TypeError: Cannot read property 
> 'IEventDispatcher' of undefined
>at IStatesObject.js:42
> (anonymous) @ IStatesObject.js:42
> IUIBase.js:58 Uncaught TypeError: Cannot read property 'IEventDispatcher' of 
> undefined
>at IUIBase.js:58
> (anonymous) @ IUIBase.js:58
> IBeadModel.js:38 Uncaught TypeError: Cannot read property 'IEventDispatcher' 
> of undefined
>at IBeadModel.js:38
> (anonymous) @ IBeadModel.js:38
> Event.js:33 Uncaught TypeError: Cannot read property 'Event' of undefined
>at Event.js:33
> (anonymous) @ Event.js:33
> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of undefined
>at Object.goog.inherits (base.js:2484)
>at UIBase.js:44
> goog.inherits @ base.js:2484
> (anonymous) @ UIBase.js:44
> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of undefined
>at Object.goog.inherits (base.js:2484)
>at eventtarget.js:96
> goog.inherits @ base.js:2484
> (anonymous) @ eventtarget.js:96
> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of undefined
>at Object.goog.inherits (base.js:2484)
>at HTMLElementWrapper.js:28
> .
> 
> 
> I'm assuming I'm not meant to be editing the html dependency list manually 
> (there's another one to change, Namespace.js has a dependency on Language.js 
> due to the use of "is") so unless something here is project-specific that's 
> changing how it's outputting/parsing the dependencies, I'm not sure what's up.
> 
> If anyone has a project that uses BinaryData, are they able to check what 
> they see in the generated HTML for that one, to see whether it's just me who 
> doesn't have the Endian dependency added..? FWIW I've been trying both with 
> 0.9.2 downloaded via NPM, and the latest develop branch (well perhaps a week 
> out of date now..)
> 
> thanks
> 
>   Andrew
> 
> 
> -Original Message-
> From: Harbs [mailto:harbs.li...@gmail.com] 
> Sent: 19 July 2018 12:18
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Query on Royale dependency generation
> 
> Are you using the -remove-circulars compiler option?
> 
>> On Jul 19, 2018, at 1:05 PM, Frost, Andrew  wrote:
>> 
>> Hi guys
>> 
>> I'd been getting an error when running a simple Royale application:
>> Uncaught TypeError: Cannot read property 'BIG_ENDIAN' of undefined
>>   at new org.apache.royale.utils.BinaryData (BinaryData.js:28)
>> 
>> the line in question is from the constructor:
>> org.apache.royale.utils.BinaryData = function(bytes) {  bytes = typeof 
>> bytes !== 'undefined' ? bytes : null;  this._endian = 
>> org.apache.royale.utils.Endian.BIG_ENDIAN;
>> and "Endian" is undefined.
>> 
>> After a little digging I found this is because the BinaryData object is 
>> being constructed without the JS engine having knowledge of the "Endian" 
>> class: something went wrong with the google dependency thing. In my 
>> generated html page I have a line:
>> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
>> ['org.apache.royale.utils.BinaryData'], 
>> ['org.apache.royale.utils.IBinaryDataInput', 
>> 'org.apache.royale.utils.IBinaryDataOutput']);
>> and if I change this to:
>> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
>> ['org.apache.royale.utils.BinaryData'], 
>> ['org.apache.royale.utils.IBinaryDataInput', 
>> 'org.apache.royale.utils.IBinaryDataOutput', 
>> 'org.apache.royale.utils.Endian']);
>> then it works.
>> 
>> Looking at where this comes from in the compiler:
>> compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/Go
>> ogleDepsWriter.java function "generateDeps" is creating these lists, 
>> and if the "removeCirculars" value is true (which it is by default unless 
>> changed on

Re: Query on Royale dependency generation

2018-07-19 Thread Harbs
The Endian dependency should be added to the main application dependency. The 
entire list should be included there. (I have 872 dependencies listed.) 
‘org.apache.royale.utils.Endian’ is one of them.

I am also using URLStream and URLBinaryLoader which list Endian as a 
dependency, so it’s possible it’s being pulled from there. I’m not sure I have 
an application which uses BinaryData without one of those.

> On Jul 19, 2018, at 3:19 PM, Harbs  wrote:
> 
> That’s weird. I believe the default is false (although I think the default 
> should be true).
> 
> Try setting -remove-circulars to true. I think that should resolve it.
> 
> Yes. I’m using BinaryData extensively.
> 
>> On Jul 19, 2018, at 3:15 PM, Frost, Andrew  wrote:
>> 
>> Hi
>> 
>> I'm not using it on my build command line, i.e. it's set as the default 
>> 'true'.
>> 
>> If I do set it to 'false' then I get what I would expect from the code, i.e. 
>> it ignores the interfaces and just outputs the discovered dependencies - 
>> including the google one:
>> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
>> ['org.apache.royale.utils.BinaryData'], ['goog.DEBUG', 
>> 'org.apache.royale.utils.Endian']);
>> 
>> But now I get hundreds of errors from the browser's JS engine e.g. 
>> IStatesObject.js:42 Uncaught TypeError: Cannot read property 
>> 'IEventDispatcher' of undefined
>>   at IStatesObject.js:42
>> (anonymous) @ IStatesObject.js:42
>> IUIBase.js:58 Uncaught TypeError: Cannot read property 'IEventDispatcher' of 
>> undefined
>>   at IUIBase.js:58
>> (anonymous) @ IUIBase.js:58
>> IBeadModel.js:38 Uncaught TypeError: Cannot read property 'IEventDispatcher' 
>> of undefined
>>   at IBeadModel.js:38
>> (anonymous) @ IBeadModel.js:38
>> Event.js:33 Uncaught TypeError: Cannot read property 'Event' of undefined
>>   at Event.js:33
>> (anonymous) @ Event.js:33
>> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of 
>> undefined
>>   at Object.goog.inherits (base.js:2484)
>>   at UIBase.js:44
>> goog.inherits @ base.js:2484
>> (anonymous) @ UIBase.js:44
>> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of 
>> undefined
>>   at Object.goog.inherits (base.js:2484)
>>   at eventtarget.js:96
>> goog.inherits @ base.js:2484
>> (anonymous) @ eventtarget.js:96
>> base.js:2484 Uncaught TypeError: Cannot read property 'prototype' of 
>> undefined
>>   at Object.goog.inherits (base.js:2484)
>>   at HTMLElementWrapper.js:28
>> .
>> 
>> 
>> I'm assuming I'm not meant to be editing the html dependency list manually 
>> (there's another one to change, Namespace.js has a dependency on Language.js 
>> due to the use of "is") so unless something here is project-specific that's 
>> changing how it's outputting/parsing the dependencies, I'm not sure what's 
>> up.
>> 
>> If anyone has a project that uses BinaryData, are they able to check what 
>> they see in the generated HTML for that one, to see whether it's just me who 
>> doesn't have the Endian dependency added..? FWIW I've been trying both with 
>> 0.9.2 downloaded via NPM, and the latest develop branch (well perhaps a week 
>> out of date now..)
>> 
>> thanks
>> 
>>  Andrew
>> 
>> 
>> -Original Message-
>> From: Harbs [mailto:harbs.li...@gmail.com] 
>> Sent: 19 July 2018 12:18
>> To: dev@royale.apache.org
>> Subject: [EXTERNAL] Re: Query on Royale dependency generation
>> 
>> Are you using the -remove-circulars compiler option?
>> 
>>> On Jul 19, 2018, at 1:05 PM, Frost, Andrew  wrote:
>>> 
>>> Hi guys
>>> 
>>> I'd been getting an error when running a simple Royale application:
>>> Uncaught TypeError: Cannot read property 'BIG_ENDIAN' of undefined
>>>  at new org.apache.royale.utils.BinaryData (BinaryData.js:28)
>>> 
>>> the line in question is from the constructor:
>>> org.apache.royale.utils.BinaryData = function(bytes) {  bytes = typeof 
>>> bytes !== 'undefined' ? bytes : null;  this._endian = 
>>> org.apache.royale.utils.Endian.BIG_ENDIAN;
>>> and "Endian" is undefined.
>>> 
>>> After a little digging I found this is because the BinaryData object is 
>>> being constructed without the JS engine having knowledge of the "Endian" 
>>> class: something went wrong with the google dependency thing. In my 
>>> generated html page I have a line:
>>> goog.addDependency('../../../or

Re: Bead Docs etc.

2018-07-19 Thread Harbs
Well, duh. I forgot about the royal-docs repo… 

They can just fork that and submit pull requests.

I do think that we should have some of this self documenting from the source 
code though. I’d like to explore that.

Thanks!
Harbs

> On Jul 19, 2018, at 2:23 PM, Andrew Wetmore  wrote:
> 
> Starting a page in the docs project and putting together material would be
> great. Then we can link it into the published docs when it is ready. I am
> not sure who grants permissions/access for that.
> 
> a
> 
> On Thu, Jul 19, 2018 at 8:14 AM, Harbs  wrote:
> 
>> I just started some folks (my daughter and some friends) on some Royale
>> work. They’re still getting into things. Hopefully as they get more into
>> things, they will be able to contribute.
>> 
>> One of the big things they are struggling with is discovering what
>> components there are and what bead can work with which components. If I was
>> not here to help them, it would be almost impossible to get going. One of
>> them expressed interest in helping writing documentation for this as they
>> are learning.
>> 
>> What’s the best way for her to do that? It doesn’t really fit into the
>> wiki. I’m not sure how to give her access to the docs.
>> 
>> I think ideally, this should be something that the code self-documents.
>> 
>> Thoughts?
>> 
>> Harbs
> 
> 
> 
> 
> -- 
> Andrew Wetmore
> 
> http://cottage14.blogspot.com/



Bead Docs etc.

2018-07-19 Thread Harbs
I just started some folks (my daughter and some friends) on some Royale work. 
They’re still getting into things. Hopefully as they get more into things, they 
will be able to contribute.

One of the big things they are struggling with is discovering what components 
there are and what bead can work with which components. If I was not here to 
help them, it would be almost impossible to get going. One of them expressed 
interest in helping writing documentation for this as they are learning.

What’s the best way for her to do that? It doesn’t really fit into the wiki. 
I’m not sure how to give her access to the docs.

I think ideally, this should be something that the code self-documents.

Thoughts?

Harbs

Re: Query on Royale dependency generation

2018-07-19 Thread Harbs
Are you using the -remove-circulars compiler option?

> On Jul 19, 2018, at 1:05 PM, Frost, Andrew  wrote:
> 
> Hi guys
> 
> I'd been getting an error when running a simple Royale application:
> Uncaught TypeError: Cannot read property 'BIG_ENDIAN' of undefined
>at new org.apache.royale.utils.BinaryData (BinaryData.js:28)
> 
> the line in question is from the constructor:
> org.apache.royale.utils.BinaryData = function(bytes) {
>  bytes = typeof bytes !== 'undefined' ? bytes : null;
>  this._endian = org.apache.royale.utils.Endian.BIG_ENDIAN;
> and "Endian" is undefined.
> 
> After a little digging I found this is because the BinaryData object is being 
> constructed without the JS engine having knowledge of the "Endian" class: 
> something went wrong with the google dependency thing. In my generated html 
> page I have a line:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], 
> ['org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput']);
> and if I change this to:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], 
> ['org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput', 
> 'org.apache.royale.utils.Endian']);
> then it works.
> 
> Looking at where this comes from in the compiler:
> compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogleDepsWriter.java
> function "generateDeps" is creating these lists, and if the "removeCirculars" 
> value is true (which it is by default unless changed on the command-line) 
> then we add dependencies for the interfaces that we implement 
> (gd.fileInfo.impls) and any static dependencies (gd.fileInfo.staticDeps) but 
> we don't add the actual dependencies that were calculated (gd.deps or 
> gd.fileInfo.deps - both of these contain the Endian definition).
> 
> So I can fix my project by updating the compiler to do:
>  if (gd.fileInfo.deps != null)
>deps.addAll(gd.fileInfo.deps);
> and then it works: the generated line though is:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], ['goog.DEBUG', 
> 'org.apache.royale.utils.Endian', 'org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput']);
> 
> 
> So my questions:
> 
>  1.  where is the fault here? Am I right in thinking that there's a missing 
> set of dependencies that need to also be added per the above snippet, or 
> should the Endian definition be listed as a dependency in the 
> gd.fileInfo.staticDeps list (which is null for me)
>  2.  presumably we don't want "goog.DEBUG" to end up in the dependency list: 
> is there a sensible way of getting rid of this (or should we just manually 
> filter out anything starting "goog.")?
>  3.  if we should be adding these dependencies separately, is there a 
> preference for "gd.deps" vs "gd.fileInfo.deps"?
> 
> thanks
> 
>   Andrew
> 
> 



Re: Query on Royale dependency generation

2018-07-19 Thread Harbs
If it’s in the big list, it should be initialized correctly.

Are you initializing a BinaryData as a static const (or preinitialized var)?

i.e. public static const DATA:BinaryData = new BinaryData() is a no-no.

I’d really like to have the compiler delay loading of static consts and var to 
the very end of the loading. That would allow this pattern…

> On Jul 19, 2018, at 4:06 PM, Frost, Andrew  wrote:
> 
> Hi
> 
> Yes (it's weird!) - okay so I just set the -remove-circulars option to true 
> explicitly but still no change (from the default).
> 
> If you look in your html file, do you get just:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], 
> ['org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput']);
> for the dependencies of it?
> 
> In the big list of dependencies at the start, then yes Endian is showing up 
> there. BinaryData isn't in that big list, because this is a dependency of 
> another of my classes (which is in the list). It's constructor is being 
> called because there's a static property being initialised i.e.
> static private var _bytes : BinaryData = new BinaryData();
> 
> 
> From a bit more digging, the issue (whether it happens or not) seems to be 
> due to the order in which the files are loaded; there can be a specific order 
> be applied in terms of ensuring that the dependencies are loaded before the 
> classes that require them, but there isn't a dependency link between 
> BinaryData and Endian (as you can see from your compiled .js files). So 
> without this dependency, it seems like luck? as to which order these go in?
> 
> I've just created another project and this one works fine, but in the network 
> info I can that Endian.js is being loaded prior to BinaryData.js. I can't see 
> why this would be: it seems to just be down to the order that the big 
> dependency list at the start of the html script is written. And I can't 
> actually see why with one project, I'm ending up with one of our own classes 
> early on in that list ... which means I currently have two solutions for 
> fixing this: (a) add the endian dependency to the binarydata line in the 
> html; (b) reorder the main list of dependencies at the top of the html to 
> make endian appear earlier on. Neither of these are a good solution when this 
> file is generated on every build!!
> 
> So: am I right in thinking that the dependency list for the BinaryData.js 
> should include the Endian one? i.e. this is wrong:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
> ['org.apache.royale.utils.BinaryData'], 
> ['org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput']);
> 
> If so, then that needs to change (somehow) and it would then solve my 
> problem...
> 
> thanks
> 
>   Andrew
> 
> 
> -Original Message-
> From: Harbs [mailto:harbs.li...@gmail.com] 
> Sent: 19 July 2018 13:32
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Query on Royale dependency generation
> 
> The Endian dependency should be added to the main application dependency. The 
> entire list should be included there. (I have 872 dependencies listed.) 
> ‘org.apache.royale.utils.Endian’ is one of them.
> 
> I am also using URLStream and URLBinaryLoader which list Endian as a 
> dependency, so it’s possible it’s being pulled from there. I’m not sure I 
> have an application which uses BinaryData without one of those.
> 
>> On Jul 19, 2018, at 3:19 PM, Harbs  wrote:
>> 
>> That’s weird. I believe the default is false (although I think the default 
>> should be true).
>> 
>> Try setting -remove-circulars to true. I think that should resolve it.
>> 
>> Yes. I’m using BinaryData extensively.
>> 
>>> On Jul 19, 2018, at 3:15 PM, Frost, Andrew  wrote:
>>> 
>>> Hi
>>> 
>>> I'm not using it on my build command line, i.e. it's set as the default 
>>> 'true'.
>>> 
>>> If I do set it to 'false' then I get what I would expect from the code, 
>>> i.e. it ignores the interfaces and just outputs the discovered dependencies 
>>> - including the google one:
>>> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
>>> ['org.apache.royale.utils.BinaryData'], ['goog.DEBUG', 
>>> 'org.apache.royale.utils.Endian']);
>>> 
>>> But now I get hundreds of errors from the browser's JS engine e.g. 
>>> IStatesObject.js:42 Uncaught TypeError: Cannot read property 
>>> 'IEventDispatcher' of undefined
>>>  at IStatesObject.js:42
>>> (anonymous) @ IStatesObject.js:42
>>

Re: Bead Docs etc.

2018-07-19 Thread Harbs
I think they were looking for “select”. They were trying to use intellisense 
(in VS Code) to find it.

I’m not sure how to solve that problem.


> On Jul 19, 2018, at 8:29 PM, Alex Harui  wrote:
> 
> Ask them where they would have looked for the answers.  IMO, having smart 
> searching in ASDoc would have helped.  Type in "dropdown" and see all classes 
> with "dropdown" in the name.  Type in "disable" see all classes with 
> "disable" in the name.  Could they work on improving the ASDoc app?
> 
> -Alex
> 
> On 7/19/18, 10:20 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>Problems they’ve run into today:
> 
>Finding a dropdown component.
> 
>Figuring out DisableBead and how to fade (DisabledAlphaBead).
> 
>> Also keep in mind that ASDoc is an app for Royale so we can add more asdoc 
>> tags and filter and do other visualizations on those tags.
> 
>Yes. I was wondering something along these lines.
> 
>> On Jul 19, 2018, at 8:16 PM, Alex Harui  wrote:
>> 
>> I'm not sure how it can be "self-documenting". Beads can be re-used by any 
>> strand.  Sometimes it will work, sometimes it won't.  There is no way for 
>> the bead author to list all strands it is known to work on, nor is the a way 
>> for a strand to list all beads that will work with it.  You can write up a 
>> list of what you know at the time, but it will get stale and require lots of 
>> energy to maintain.  I have the same concern for a list in our docs as well. 
>>  I think it will get stale and not describe the full range of possibilities.
>> 
>> I feel like you didn't really state the fundamental question.  What problem 
>> are they actually running into?  IOW, are they really looking for a list of 
>> assumptions or invariants a bead has?  That might be describable at author 
>> time.  Could it be discovered by the compiler so that is self-documenting?  
>> Not sure about that.  We could list the interface dependencies or something 
>> like that.
>> 
>> Many folks write code by trial-and-error, and beads were meant to be easy to 
>> add and remove.  Try it, oops, it doesn't work, try another one.
>> 
>> Also keep in mind that ASDoc is an app for Royale so we can add more asdoc 
>> tags and filter and do other visualizations on those tags.
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 7/19/18, 5:03 AM, "Harbs" > <mailto:harbs.li...@gmail.com> <mailto:harbs.li...@gmail.com 
>> <mailto:harbs.li...@gmail.com>>> wrote:
>> 
>>   Well, duh. I forgot about the royal-docs repo… 
>> 
>>   They can just fork that and submit pull requests.
>> 
>>   I do think that we should have some of this self documenting from the 
>> source code though. I’d like to explore that.
>> 
>>   Thanks!
>>   Harbs
>> 
>>> On Jul 19, 2018, at 2:23 PM, Andrew Wetmore >> <mailto:cottag...@gmail.com>> wrote:
>>> 
>>> Starting a page in the docs project and putting together material would be
>>> great. Then we can link it into the published docs when it is ready. I am
>>> not sure who grants permissions/access for that.
>>> 
>>> a
>>> 
>>> On Thu, Jul 19, 2018 at 8:14 AM, Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>>> I just started some folks (my daughter and some friends) on some Royale
>>>> work. They’re still getting into things. Hopefully as they get more into
>>>> things, they will be able to contribute.
>>>> 
>>>> One of the big things they are struggling with is discovering what
>>>> components there are and what bead can work with which components. If I was
>>>> not here to help them, it would be almost impossible to get going. One of
>>>> them expressed interest in helping writing documentation for this as they
>>>> are learning.
>>>> 
>>>> What’s the best way for her to do that? It doesn’t really fit into the
>>>> wiki. I’m not sure how to give her access to the docs.
>>>> 
>>>> I think ideally, this should be something that the code self-documents.
>>>> 
>>>> Thoughts?
>>>> 
>>>> Harbs
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Andrew Wetmore
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcottage14.blogspot.com%2Fdata=02%7C01%7Caharui%40adobe.com%7Cc52ab38bd9d248dd52b608d5ed6f94d4%7Cfa7b1b5a7b34438794ae

Re: Bead Docs etc.

2018-07-19 Thread Harbs
Problems they’ve run into today:

Finding a dropdown component.

Figuring out DisableBead and how to fade (DisabledAlphaBead).

> Also keep in mind that ASDoc is an app for Royale so we can add more asdoc 
> tags and filter and do other visualizations on those tags.

Yes. I was wondering something along these lines.

> On Jul 19, 2018, at 8:16 PM, Alex Harui  wrote:
> 
> I'm not sure how it can be "self-documenting". Beads can be re-used by any 
> strand.  Sometimes it will work, sometimes it won't.  There is no way for the 
> bead author to list all strands it is known to work on, nor is the a way for 
> a strand to list all beads that will work with it.  You can write up a list 
> of what you know at the time, but it will get stale and require lots of 
> energy to maintain.  I have the same concern for a list in our docs as well.  
> I think it will get stale and not describe the full range of possibilities.
> 
> I feel like you didn't really state the fundamental question.  What problem 
> are they actually running into?  IOW, are they really looking for a list of 
> assumptions or invariants a bead has?  That might be describable at author 
> time.  Could it be discovered by the compiler so that is self-documenting?  
> Not sure about that.  We could list the interface dependencies or something 
> like that.
> 
> Many folks write code by trial-and-error, and beads were meant to be easy to 
> add and remove.  Try it, oops, it doesn't work, try another one.
> 
> Also keep in mind that ASDoc is an app for Royale so we can add more asdoc 
> tags and filter and do other visualizations on those tags.
> 
> My 2 cents,
> -Alex
> 
> On 7/19/18, 5:03 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>Well, duh. I forgot about the royal-docs repo… 
> 
>They can just fork that and submit pull requests.
> 
>I do think that we should have some of this self documenting from the 
> source code though. I’d like to explore that.
> 
>Thanks!
>Harbs
> 
>> On Jul 19, 2018, at 2:23 PM, Andrew Wetmore  wrote:
>> 
>> Starting a page in the docs project and putting together material would be
>> great. Then we can link it into the published docs when it is ready. I am
>> not sure who grants permissions/access for that.
>> 
>> a
>> 
>> On Thu, Jul 19, 2018 at 8:14 AM, Harbs  wrote:
>> 
>>> I just started some folks (my daughter and some friends) on some Royale
>>> work. They’re still getting into things. Hopefully as they get more into
>>> things, they will be able to contribute.
>>> 
>>> One of the big things they are struggling with is discovering what
>>> components there are and what bead can work with which components. If I was
>>> not here to help them, it would be almost impossible to get going. One of
>>> them expressed interest in helping writing documentation for this as they
>>> are learning.
>>> 
>>> What’s the best way for her to do that? It doesn’t really fit into the
>>> wiki. I’m not sure how to give her access to the docs.
>>> 
>>> I think ideally, this should be something that the code self-documents.
>>> 
>>> Thoughts?
>>> 
>>> Harbs
>> 
>> 
>> 
>> 
>> -- 
>> Andrew Wetmore
>> 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcottage14.blogspot.com%2Fdata=02%7C01%7Caharui%40adobe.com%7Cc52ab38bd9d248dd52b608d5ed6f94d4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636675985850576041sdata=ECkPC4lmBreJPnEMhIKIMbJApeHy1eATT5vzoPYkXS8%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcottage14.blogspot.com%2Fdata=02%7C01%7Caharui%40adobe.com%7Cc52ab38bd9d248dd52b608d5ed6f94d4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636675985850576041sdata=ECkPC4lmBreJPnEMhIKIMbJApeHy1eATT5vzoPYkXS8%3Dreserved=0>


Re: Query on Royale dependency generation

2018-07-19 Thread Harbs
Here’s the short version:

All the files are loaded in order of the dependency declarations. Calculating 
the correct order is very difficult and sometimes impossible.

The way the circular dependencies are resolved is by simply declaring them all 
in the main class. Declaring them in subclasses can cause goog to try and load 
files before they are a actually loaded. The exact order ends up being a bit of 
a crapshoot. Statics are evaluated when the file is first loaded, so 
initializing anything other than native (or externally loaded) objects can 
cause an error.

My proposed solution is to extract all non-native costs and initialized vars 
into a separate file and load that file last in the dependency list. That 
ensures all the classes are already loaded. Unfortunately no-one has worked on 
resolving this problem yet. Earlier versions of the compiler tried to be 
smarter about order, but that turned out to not always work…

Alex could give you the longer version… ;-)

What I do for cases where static custom classes are needed is something like 
this:

private static var _myFoo:Foo;
public static function get FOO():Foo{
if(!_myFoo){
_myFoo = new Foo();
}
return _myFoo;
}

There’s slightly more overhead than a const, but at least it works…

Harbs

> On Jul 19, 2018, at 4:39 PM, Frost, Andrew  wrote:
> 
> Hi
> 
>> If it’s in the big list, it should be initialized correctly.
> .. but depending on the order of the big list, things will be initialised in 
> different orders...
> 
>> Are you initializing a BinaryData as a static const (or preinitialized var)?
> Yes
>> i.e. public static const DATA:BinaryData = new BinaryData() is a no-no.
> So - why is this a no-no? I'm trying to convert an ActionScript class that 
> Adobe wrote a long time ago, which has the equivalent using ByteArray. Are 
> you saying that it's not possible to do certain things with ActionScript in 
> Royale that are fine when you're targeting Flash?
> I know it's not a great practice to have this sort of thing but I would hope 
> that there is some level of parity between the ActionScript code that you can 
> write for each of the targets; plus, as I've found, all that's needed for 
> this construct to work 100% of the time is if we could specify the correct 
> dependencies for the BinaryData class.
> 
>> I’d really like to have the compiler delay loading of static consts and var 
>> to the very end of the loading. That would allow this pattern…
> True, and possibly that could work, but surely it would also be allowed if we 
> generated the line:
> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js',
>  ['org.apache.royale.utils.BinaryData'], [ 'org.apache.royale.utils.Endian', 
>  'org.apache.royale.utils.IBinaryDataInput', 
> 'org.apache.royale.utils.IBinaryDataOutput']);
> 
> So regardless of all the discussion, I would quite like to find out why the 
> 'Endian' isn't listed as a dependency when all this html/JS stuff is 
> generated... likewise some of the other constructs where something depends on 
> something else (e.g. "is" is being used in the Namespace constructor, but I'm 
> creating a Namespace prior to the Language.js file being loaded..)
> 
> I guess we can't actually wait until the end of loading everything until we 
> start to initialise things, unless we change how the JS code is output (i.e. 
> to have a single static initialiser for the class which is run after 
> everything is loaded, rather than declaring all the static properties with 
> initialisation in-place..)
> 
> Interesting problem!
> 
> thanks
> 
>   Andrew
> 
> 
> -Original Message-
> From: Harbs [mailto:harbs.li...@gmail.com] 
> Sent: 19 July 2018 14:19
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Query on Royale dependency generation
> 
> If it’s in the big list, it should be initialized correctly.
> 
> Are you initializing a BinaryData as a static const (or preinitialized var)?
> 
> i.e. public static const DATA:BinaryData = new BinaryData() is a no-no.
> 
> I’d really like to have the compiler delay loading of static consts and var 
> to the very end of the loading. That would allow this pattern…
> 
>> On Jul 19, 2018, at 4:06 PM, Frost, Andrew  wrote:
>> 
>> Hi
>> 
>> Yes (it's weird!) - okay so I just set the -remove-circulars option to true 
>> explicitly but still no change (from the default).
>> 
>> If you look in your html file, do you get just:
>> goog.addDependency('../../../org/apache/royale/utils/BinaryData.js', 
>> ['org.apache.royale.utils.BinaryData'], 
>> ['org.apache.royale.utils.IBinaryDataInput', 
>> 'org.apache.royale.utils.IBinaryDataOutput']);
>> for the dependencies

Re: royale-extras and the royale-typedefs Maven build

2018-09-01 Thread Harbs
Yes. Royale-extras exists to supplement Royale in up-stream or down-stream code 
which is not part of our official project. The only thing there right now is a 
fork of closure-compiler with patched extern files. Ideally any externs which 
need patching should be patched in this org.

I see you’re not a member of royale-extras. I just sent you an invite.

> On Sep 1, 2018, at 2:44 AM, Alex Harui  wrote:
> 
> I found some time to look into the Maven build on builds.a.o.
> 
> AFAICT, the reason it is working for us locally but not on builds.a.o is 
> because the google_maps build is trying to call Git to patch the externs 
> file.  On builds.a.o, it is unable to find git.  My theory is that some 
> configuration changed and Git is no longer in the path.
> 
> While we could ask infra what the path is to Git, or figure it out ourselves, 
> in looking at old emails, it appears that a royale-extras repo exists to try 
> to eliminate the need to patch these externs.  Can someone confirm this?  I 
> tried just skipping the patch step and the build failed, so it appears that 
> what is in royale-extras for google_maps is "pre-patch".  This implies that 
> one possible solution is to update royale-extras with the post-patch extern.  
>  This would be preferable, IMO, since it would be less config dependent and 
> thus more likely to work on builds.a.o and elsewhere.  Can someone confirm 
> this is the case, and better yet, make the required changes?
> 
> That said, if I am right and updating google_maps in royale-extras and 
> removing the patch step fixes the build, my next question is about how we are 
> handling the code in royale-extras.  Is this an ASF thing, someone's personal 
> thing, something else?  We may need to review our LICENSE/NOTICE files?
> 
> Thanks,
> -Alex
> 



Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
Both the develop branch and the merge branch are failing while building Basic. 
The tests are failing:

The revert-refactor branch (which I have been mostly using lately) compiles 
with no issues.

[echo] Compiling FlexUnitRoyaleApplication.swf
 [echo] ROYALE_HOME: /Apache/royale-asjs
 [echo] ROYALE_SWF_COMPILER_HOME: /Apache/royale-asjs
 [echo] FLEXUNIT_HOME: /Apache/royale-asjs/in/flexunit
 [echo] playerglobal.version: 11.1
[mxmlc] MXMLJSC
[mxmlc] -debug
[mxmlc] -compiler.targets=SWF
[mxmlc] +playerglobal.version=11.1
[mxmlc] +env.PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player
[mxmlc] -swf-library-path+=/Apache/royale-asjs/frameworks/libs
[mxmlc] -swf-library-path+=/Apache/royale-asjs/in/flexunit/flexunit
[mxmlc] -define+=CONFIG::dummy,false
[mxmlc] +royalelib=/Apache/royale-asjs/frameworks/
[mxmlc] 
-output=/Apache/royale-asjs/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.swf
[mxmlc] --
[mxmlc] 
/Apache/royale-asjs/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml
[mxmlc] 0.765562837 seconds
[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml(74): col: 0 Error: 
configuration variable 'compiler.external-library-path' value contains unknown 
token 'targetPlayerMajorVersion'.
[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml (line: 74)
[mxmlc] 
[mxmlc]   
[mxmlc] 
[mxmlc] 
[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml(98): col: 0 Error: 
configuration variable 'compiler.library-path' value contains unknown token 
'targetPlayerMajorVersion'.
[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml (line: 98)
[mxmlc] 
[mxmlc]   

I’m having trouble finding what changed. The royale-config file appears to be 
the same when compiling with all branches.

Harbs

> On Sep 1, 2018, at 6:55 PM, Piotr Zarzycki  wrote:
> 
> Carlos,
> 
> I will work on Monday on that. I'm going to take the simplest blog example
> and analyze why it is not displaying.
> 
> DataGroup has definitely some conflicts, but I tried Data Binding blog
> example and it didn't work. - In that case I got some errors - you can
> check on your own if you have time over the weekend.
> 
> Piotr
> 
> On Sat, Sep 1, 2018, 10:34 AM Carlos Rovira  wrote:
> 
>> Hi Alex, Piotr,
>> 
>> I merged few latest changes and I did and try integration branch.
>> Maven build pass localy wich is good! :)
>> But unfortunately some things are not right and Jewel Example doesn't work.
>> Don't know about MXRoyale, that Alex can report if changes work or not.
>> 
>> Some of the problems are the changes did in TBodyContentArea and the
>> classes to add, remove data, but problems seems to go far from there.
>> I started to comment "sections" in Jewel example to avoid runtime errors,
>> and have to comment
>> TablePlayGround
>> and since DateChooser uses Table I had to comment
>> DateComponentsPlayGround
>> With this JewelExample runs without errors but Drawer Navigation doesn't
>> shows any option, but no errors are displayed at runtime.
>> 
>> So I added in browser code "is-active" class to sections I want to display
>> to try other parts of Jewel and found that List based components are not
>> rendering item renderers (List, ComboBox,...)
>> or bindings are not working, or something is bad when trying to add the
>> items to the component.
>> 
>> As Alex said the problem can be that things in develop can't be the latest,
>> if for example DataGroup has changed in MXRoyale and Jewel needs to be
>> adapted to that changes we need to know what changes are but I don't think
>> changing the code "blindly" will solve the problem.
>> 
>> I think we should check point each commit to see where are the hot points
>> and fix them.
>> 
>> I still need to fix some important things for release in develop, so I'll
>> be busy today and maybe tomorrow. With that done I can concentrate in help
>> with the release.
>> 
>> Piotr, if you can discover the points of conflict and can share here will
>> be great, you can try to fix the problems, but test that changes work in
>> Jewel Example, other way is to share it here and I can try to fix it or
>> help you to fix it.
>> 
>> Thanks
>> 
>> Carlos
>> 
>> 
>> El sáb., 1 sept. 2018 a las 1:00, Alex Harui ()
>> escribió:
>> 
>>> Please remember that an integration branch contains changes from two
>>> branches and when files get moved around, it is possible for changes to
>> get
>>> out of sync.  What is in the develop branch may not be the "latest".
>>&

Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
It looks like the merge from MXRoyale has problems.

DataContainerView has none of the changes that were done in MXRoyale (among 
other things)

DataContainerView got all the methods that were originally in 
DataContainerBase, but those changes did not survive the merge…

Fun, fun… ;-)

Harbs

> On Sep 2, 2018, at 12:59 PM, Harbs  wrote:
> 
> Now that I’m able to compile, I started testing the current state…
> 
> Why was DataContainerBase changed?
> 
> DataContainerBase.removeAllItemRenderers no longer exists. 
> DataItemRendererFactoryForArrayList.dataProviderChangeHandler calls 
> dataGroup.removeAllItemRenderers() on a List which now fails with a RTE 
> because removeAllItemRenderers is undefined.
> 
>> On Aug 31, 2018, at 3:42 PM, Harbs  wrote:
>> 
>> I’ll try to work on it on Sunday.
>> 
>>> On Aug 31, 2018, at 3:29 PM, Piotr Zarzycki  
>>> wrote:
>>> 
>>> Guys,
>>> 
>>> ANT and Maven build on branch is working right now. Please test your stuff.
>>> 
>>> Carlos,
>>> 
>>> Please take a look into RemoveTableItemRendererForArrayListData because I
>>> have commented out that line. Probably something won't work. Let me know
>>> how it's looks like.
>>> If you won't have time next wee let me know I will test Jewel on my own on
>>> Monday.
>>> 
>>> Alina,
>>> 
>>> I need your testing on that branch to make sure that I didn't break
>>> anything. I have merged all stuff from MXRoyale, so basically there is
>>> everything there.
>>> 
>>> Harbs,
>>> 
>>> I will be waiting for your changes which you have been talking about
>>> earlier.
>>> 
>>> Let's make this release happen!
>>> 
>>> Thanks,
>>> Piotr
>>> 
>>> pt., 31 sie 2018 o 13:23 Piotr Zarzycki 
>>> napisał(a):
>>> 
>>>> Harbs,
>>>> 
>>>> Can you jump to feature/Merge_MXRoyale_To_Develop and try build there? It
>>>> will help me with all of that. This branch contains merged develop and
>>>> MXRoyale.
>>>> I'm assuming you are using ANT.
>>>> 
>>>> As for that line in DataGridView I have change it to DataGridColumnList.
>>>> Please make changes if needed to something else on that branch. This branch
>>>> will be merged to develop once everyone tell me that I didn't break
>>>> anything. :)
>>>> 
>>>> Thanks,
>>>> Piotr
>>>> 
>>>> pt., 31 sie 2018 o 13:16 Harbs  napisał(a):
>>>> 
>>>>> The build passes for me on the latest develop branch using ant.
>>>>> 
>>>>> Are you building with ant or maven?
>>>>> 
>>>>>> On Aug 31, 2018, at 2:13 PM, Harbs  wrote:
>>>>>> 
>>>>>> Scratch that.
>>>>>> 
>>>>>> It does have an itemRenderer property and it inherits from
>>>>> IItemRendererProvider
>>>>>> 
>>>>>>> On Aug 31, 2018, at 1:18 PM, Harbs >>>> harbs.li...@gmail.com>> wrote:
>>>>>>> 
>>>>>>> That change should be reverted. I added it to try and fix an issue
>>>>> with Express, but Express data grids don’t mix with Basic columns.
>>>>>>> 
>>>>>>>> On Aug 31, 2018, at 12:37 PM, Piotr Zarzycki <
>>>>> piotrzarzyck...@gmail.com <mailto:piotrzarzyck...@gmail.com>> wrote:
>>>>>>>> 
>>>>>>>> Hi Harbs,
>>>>>>>> 
>>>>>>>> Some time ago you have added interface IDataGridColumnList [1]. It is
>>>>> used
>>>>>>>> here [2], couple of lines later there is assignment
>>>>>>>> 
>>>>>>>> list.itemRenderer = dataGridColumn.itemRenderer;
>>>>>>>> 
>>>>>>>> But that interface doesn't have itemRenderer property and build is
>>>>>>>> failing - locally. How actually it is working ?
>>>>>>>> 
>>>>>>>> [1]
>>>>>>>> 
>>>>> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/IDataGridColumnList.as
>>>>> <
>>>>> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/I

Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
Now that I’m able to compile, I started testing the current state…

Why was DataContainerBase changed?

DataContainerBase.removeAllItemRenderers no longer exists. 
DataItemRendererFactoryForArrayList.dataProviderChangeHandler calls 
dataGroup.removeAllItemRenderers() on a List which now fails with a RTE because 
removeAllItemRenderers is undefined.

> On Aug 31, 2018, at 3:42 PM, Harbs  wrote:
> 
> I’ll try to work on it on Sunday.
> 
>> On Aug 31, 2018, at 3:29 PM, Piotr Zarzycki  
>> wrote:
>> 
>> Guys,
>> 
>> ANT and Maven build on branch is working right now. Please test your stuff.
>> 
>> Carlos,
>> 
>> Please take a look into RemoveTableItemRendererForArrayListData because I
>> have commented out that line. Probably something won't work. Let me know
>> how it's looks like.
>> If you won't have time next wee let me know I will test Jewel on my own on
>> Monday.
>> 
>> Alina,
>> 
>> I need your testing on that branch to make sure that I didn't break
>> anything. I have merged all stuff from MXRoyale, so basically there is
>> everything there.
>> 
>> Harbs,
>> 
>> I will be waiting for your changes which you have been talking about
>> earlier.
>> 
>> Let's make this release happen!
>> 
>> Thanks,
>> Piotr
>> 
>> pt., 31 sie 2018 o 13:23 Piotr Zarzycki 
>> napisał(a):
>> 
>>> Harbs,
>>> 
>>> Can you jump to feature/Merge_MXRoyale_To_Develop and try build there? It
>>> will help me with all of that. This branch contains merged develop and
>>> MXRoyale.
>>> I'm assuming you are using ANT.
>>> 
>>> As for that line in DataGridView I have change it to DataGridColumnList.
>>> Please make changes if needed to something else on that branch. This branch
>>> will be merged to develop once everyone tell me that I didn't break
>>> anything. :)
>>> 
>>> Thanks,
>>> Piotr
>>> 
>>> pt., 31 sie 2018 o 13:16 Harbs  napisał(a):
>>> 
>>>> The build passes for me on the latest develop branch using ant.
>>>> 
>>>> Are you building with ant or maven?
>>>> 
>>>>> On Aug 31, 2018, at 2:13 PM, Harbs  wrote:
>>>>> 
>>>>> Scratch that.
>>>>> 
>>>>> It does have an itemRenderer property and it inherits from
>>>> IItemRendererProvider
>>>>> 
>>>>>> On Aug 31, 2018, at 1:18 PM, Harbs >>> harbs.li...@gmail.com>> wrote:
>>>>>> 
>>>>>> That change should be reverted. I added it to try and fix an issue
>>>> with Express, but Express data grids don’t mix with Basic columns.
>>>>>> 
>>>>>>> On Aug 31, 2018, at 12:37 PM, Piotr Zarzycki <
>>>> piotrzarzyck...@gmail.com <mailto:piotrzarzyck...@gmail.com>> wrote:
>>>>>>> 
>>>>>>> Hi Harbs,
>>>>>>> 
>>>>>>> Some time ago you have added interface IDataGridColumnList [1]. It is
>>>> used
>>>>>>> here [2], couple of lines later there is assignment
>>>>>>> 
>>>>>>> list.itemRenderer = dataGridColumn.itemRenderer;
>>>>>>> 
>>>>>>> But that interface doesn't have itemRenderer property and build is
>>>>>>> failing - locally. How actually it is working ?
>>>>>>> 
>>>>>>> [1]
>>>>>>> 
>>>> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/IDataGridColumnList.as
>>>> <
>>>> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/IDataGridColumnList.as
>>>>> 
>>>>>>> [2]
>>>>>>> 
>>>> https://github.com/apache/royale-asjs/blob/75f379c72732cd208f535f6f029cfc0b2efe0ee4/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as#L229
>>>> <
>>>> https://github.com/apache/royale-asjs/blob/75f379c72732cd208f535f6f029cfc0b2efe0ee4/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as#L229
>>>>> 
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Piotr
>>>>>>> 
>>>>>>> 
>>>>>>> pt., 31 sie 2018 o 10:33 Carlos Rovi

Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
I found the problem.

Carlos, I don’t know why you changed the tokens in the config files, but 
changing them made them unrecognized and caused the FlexUnit tests to fail.

I reverted those changes. I don’t know what effects these changes had on the 
Maven build.

Harbs


> On Sep 2, 2018, at 12:01 PM, Harbs  wrote:
> 
> Both the develop branch and the merge branch are failing while building 
> Basic. The tests are failing:
> 
> The revert-refactor branch (which I have been mostly using lately) compiles 
> with no issues.
> 
>[echo] Compiling FlexUnitRoyaleApplication.swf
> [echo] ROYALE_HOME: /Apache/royale-asjs
> [echo] ROYALE_SWF_COMPILER_HOME: /Apache/royale-asjs
> [echo] FLEXUNIT_HOME: /Apache/royale-asjs/in/flexunit
> [echo] playerglobal.version: 11.1
>[mxmlc] MXMLJSC
>[mxmlc] -debug
>[mxmlc] -compiler.targets=SWF
>[mxmlc] +playerglobal.version=11.1
>[mxmlc] +env.PLAYERGLOBAL_HOME=/Apache/frameworks/libs/player
>[mxmlc] -swf-library-path+=/Apache/royale-asjs/frameworks/libs
>[mxmlc] -swf-library-path+=/Apache/royale-asjs/in/flexunit/flexunit
>[mxmlc] -define+=CONFIG::dummy,false
>[mxmlc] +royalelib=/Apache/royale-asjs/frameworks/
>[mxmlc] 
> -output=/Apache/royale-asjs/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.swf
>[mxmlc] --
>[mxmlc] 
> /Apache/royale-asjs/frameworks/projects/Basic/src/test/royale/FlexUnitRoyaleApplication.mxml
>[mxmlc] 0.765562837 seconds
>[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml(74): col: 0 
> Error: configuration variable 'compiler.external-library-path' value contains 
> unknown token 'targetPlayerMajorVersion'.
>[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml (line: 74)
>[mxmlc] 
>[mxmlc]   
>[mxmlc] 
>[mxmlc] 
>[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml(98): col: 0 
> Error: configuration variable 'compiler.library-path' value contains unknown 
> token 'targetPlayerMajorVersion'.
>[mxmlc] /Apache/royale-asjs/frameworks/royale-config.xml (line: 98)
>[mxmlc] 
>[mxmlc]   
> 
> I’m having trouble finding what changed. The royale-config file appears to be 
> the same when compiling with all branches.
> 
> Harbs
> 
>> On Sep 1, 2018, at 6:55 PM, Piotr Zarzycki  wrote:
>> 
>> Carlos,
>> 
>> I will work on Monday on that. I'm going to take the simplest blog example
>> and analyze why it is not displaying.
>> 
>> DataGroup has definitely some conflicts, but I tried Data Binding blog
>> example and it didn't work. - In that case I got some errors - you can
>> check on your own if you have time over the weekend.
>> 
>> Piotr
>> 
>> On Sat, Sep 1, 2018, 10:34 AM Carlos Rovira  wrote:
>> 
>>> Hi Alex, Piotr,
>>> 
>>> I merged few latest changes and I did and try integration branch.
>>> Maven build pass localy wich is good! :)
>>> But unfortunately some things are not right and Jewel Example doesn't work.
>>> Don't know about MXRoyale, that Alex can report if changes work or not.
>>> 
>>> Some of the problems are the changes did in TBodyContentArea and the
>>> classes to add, remove data, but problems seems to go far from there.
>>> I started to comment "sections" in Jewel example to avoid runtime errors,
>>> and have to comment
>>> TablePlayGround
>>> and since DateChooser uses Table I had to comment
>>> DateComponentsPlayGround
>>> With this JewelExample runs without errors but Drawer Navigation doesn't
>>> shows any option, but no errors are displayed at runtime.
>>> 
>>> So I added in browser code "is-active" class to sections I want to display
>>> to try other parts of Jewel and found that List based components are not
>>> rendering item renderers (List, ComboBox,...)
>>> or bindings are not working, or something is bad when trying to add the
>>> items to the component.
>>> 
>>> As Alex said the problem can be that things in develop can't be the latest,
>>> if for example DataGroup has changed in MXRoyale and Jewel needs to be
>>> adapted to that changes we need to know what changes are but I don't think
>>> changing the code "blindly" will solve the problem.
>>> 
>>> I think we should check point each commit to see where are the hot points
>>> and fix them.
>>> 
>>> I still need to fix some important things for release in develop, so I'll
>>> be busy today and maybe tomorrow. With that done I can concentrate in help
>>> with the release.
>

Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
To tell you the truth, I don’t understand exactly how the tokens are working, 
but the $ prefix definitely breaks it.

I’m guessing the brackets is an XML construct recognized as a variable in 
things like E4X.

Harbs

> On Sep 2, 2018, at 1:30 PM, Carlos Rovira  wrote:
> 
> Hi Habs,
> 
> El dom., 2 sept. 2018 a las 11:42, Harbs () escribió:
> 
>> I found the problem.
>> 
>> Carlos, I don’t know why you changed the tokens in the config files, but
>> changing them made them unrecognized and caused the FlexUnit tests to fail.
>> 
>> 
> I thought the tokens you refer was not correctly setup, since doesn't have
> the $ symbol and this way those are not interpreted and changed by maven.
> What I tried to do is fix maven build distribution. When I create a SDK vía
> Maven, I get flex-config.xml and other files with
> 
> 
> {playerglobalHome}/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc
> 
> instead of
> 
>  libs/path/20.0/playerglobal.swc
> 
> that is what IDEs expect.
> 
> Maybe this is not the way to get this? if not how could we get maven
> generates those files?. In the other hand, Can FlexUnit change to recognize
> token with $ prefix?
> 
> Thanks
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: [Discuss] Start release process 0.9.3

2018-09-02 Thread Harbs
I’m working on a new merge.

I’m moving some classes back to Basic to reduce the number of conflicts.

Let’s see if my attempt works any better.

If it works well, I’ll push my branch when it’s done…

On my first attempt to merge, I see lots of conflicts related to AMF. I’m not 
sure which is the latest.

> On Sep 2, 2018, at 6:26 PM, Carlos Rovira  wrote:
> 
> The problem is than far beyond the merge problems, code was changed in some
> classes (at least in Jewel I see changes), to get compiling. This make more
> difficult to be confident with the actual code I integration branch since
> we must to know what code is the latest, and see if code was not changed to
> get it compile, since normally that code will not work since was change to
> compile but never tested, and would be a hit of luck if it works.
> 
> As I said, I can help on that front in few days, but I'm running to get
> most of the things I have on my plate done, working many ours a day in
> this. Sorry to not be of much help right now.
> 
> Carlos
> 
> 
> 
> El dom., 2 sept. 2018 a las 14:38, Piotr Zarzycki (<
> piotrzarzyck...@gmail.com>) escribió:
> 
>> I meant here  DataContainerView and  DataContainerBase missing methods
>> there.
>> 
>> Thanks,
>> Piotr
>> 
>> niedz., 2 wrz 2018 o 14:24 Harbs  napisał(a):
>> 
>>> I’m not sure what you are referring to. Do you mean the merge conflicts?
>>> 
>>> I’m pretty sure there is more than one class which has conflicts. Carlos
>>> is right that there could be lot of classes which need resolution, but
>> I’m
>>> not sure what the right answer is.
>>> 
>>> We might need to go through all the classes manually and check them…
>>> 
>>>> On Sep 2, 2018, at 2:34 PM, Piotr Zarzycki 
>>> wrote:
>>>> 
>>>> Hi Carlos,
>>>> 
>>>> Please let's do not make such drastical steps. It looks like Harbs
>> found
>>>> where the issue is.
>>>> 
>>>> Let's make the changes and see whether it is working.
>>>> 
>>>> Harbs can you do this?
>>>> 
>>>> Thanks,
>>>> Piotr
>>>> 
>>>> On Sun, Sep 2, 2018, 12:42 PM Harbs  wrote:
>>>> 
>>>>> To tell you the truth, I don’t understand exactly how the tokens are
>>>>> working, but the $ prefix definitely breaks it.
>>>>> 
>>>>> I’m guessing the brackets is an XML construct recognized as a variable
>>> in
>>>>> things like E4X.
>>>>> 
>>>>> Harbs
>>>>> 
>>>>>> On Sep 2, 2018, at 1:30 PM, Carlos Rovira 
>>>>> wrote:
>>>>>> 
>>>>>> Hi Habs,
>>>>>> 
>>>>>> El dom., 2 sept. 2018 a las 11:42, Harbs ()
>>>>> escribió:
>>>>>> 
>>>>>>> I found the problem.
>>>>>>> 
>>>>>>> Carlos, I don’t know why you changed the tokens in the config files,
>>> but
>>>>>>> changing them made them unrecognized and caused the FlexUnit tests
>> to
>>>>> fail.
>>>>>>> 
>>>>>>> 
>>>>>> I thought the tokens you refer was not correctly setup, since doesn't
>>>>> have
>>>>>> the $ symbol and this way those are not interpreted and changed by
>>> maven.
>>>>>> What I tried to do is fix maven build distribution. When I create a
>> SDK
>>>>> vía
>>>>>> Maven, I get flex-config.xml and other files with
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>> 
>> {playerglobalHome}/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc
>>>>>> 
>>>>>> instead of
>>>>>> 
>>>>>>libs/path/20.0/playerglobal.swc
>>>>>> 
>>>>>> that is what IDEs expect.
>>>>>> 
>>>>>> Maybe this is not the way to get this? if not how could we get maven
>>>>>> generates those files?. In the other hand, Can FlexUnit change to
>>>>> recognize
>>>>>> token with $ prefix?
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Carlos Rovira
>>>>>> http://about.me/carlosrovira
>>>>> 
>>>>> 
>>> 
>>> 
>> 
>> --
>> 
>> Piotr Zarzycki
>> 
>> Patreon: *https://www.patreon.com/piotrzarzycki
>> <https://www.patreon.com/piotrzarzycki>*
>> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: [royale-asjs] branch feature/new_merge updated: Added ignores

2018-09-05 Thread Harbs
Not sure what you’re asking.

Any function which has an as statement or function typecasting (i.e. _stand as 
IEventDispatcher or IEventDispatcher(_strand)) will output a Language.as call 
unless you add a @royaleignorecoercion comment with the fully classified class 
name.

There’s also @royaleemitcoercion for cases where the “as” or typecast is 
important.

So, if you do:

var foo:Foo is baz as Foo;
If(foo){// if the typecast failed we have null
// do something
}

You’d want to make sure we have Language.as called and you’d use 
@royaleemitcoercion.

In most cases, we’d want clean js code and you’d use @royaleignorecoercion.

Is that helpful?

Harbs

> On Sep 5, 2018, at 8:15 PM, Carlos Rovira  wrote:
> 
> Hi Harbs,
> 
> in order to add this comments myself, how do I need to have into account.
> This part is still a bit obscure for me
> thanks
> 
> Carlos
> 
> 
> El mié., 5 sept. 2018 a las 15:15,  escribió:
> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> harbs pushed a commit to branch feature/new_merge
>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>> 
>> 
>> The following commit(s) were added to refs/heads/feature/new_merge by this
>> push:
>> new 7b24e79  Added ignores
>> 7b24e79 is described below
>> 
>> commit 7b24e79964407e4e2093373ce51aaf32142e6927
>> Author: Harbs 
>> AuthorDate: Wed Sep 5 16:15:20 2018 +0300
>> 
>>Added ignores
>> ---
>> .../jewel/beads/itemRenderers/AddListItemRendererForArrayListData.as  | 2
>> ++
>> .../beads/itemRenderers/RemoveListItemRendererForArrayListData.as | 4
>> 
>> 2 files changed, 6 insertions(+)
>> 
>> diff --git
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/AddListItemRendererForArrayListData.as
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/AddListItemRendererForArrayListData.as
>> index 188dba2..36311b8 100644
>> ---
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/AddListItemRendererForArrayListData.as
>> +++
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/AddListItemRendererForArrayListData.as
>> @@ -122,6 +122,8 @@ package org.apache.royale.jewel.beads.itemRenderers
>> *  @playerversion Flash 10.2
>> *  @playerversion AIR 2.6
>> *  @productversion Royale 0.9.4
>> +*  @royaleignorecoercion
>> org.apache.royale.core.ISelectableItemRenderer
>> +*  @royaleignorecoercion
>> org.apache.royale.events.IEventDispatcher
>> */
>>protected function
>> handleItemAdded(event:CollectionEvent):void
>>{
>> diff --git
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/RemoveListItemRendererForArrayListData.as
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/RemoveListItemRendererForArrayListData.as
>> index 98aa953..d591553 100644
>> ---
>> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/RemoveListItemRendererForArrayListData.as
>> +++
>> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/itemRenderers/RemoveListItemRendererForArrayListData.as
>> @@ -114,6 +114,8 @@ package org.apache.royale.jewel.beads.itemRenderers
>> *  @playerversion Flash 10.2
>> *  @playerversion AIR 2.6
>> *  @productversion Royale 0.9.4
>> +*  @royaleignorecoercion
>> org.apache.royale.core.ISelectableItemRenderer
>> +*  @royaleignorecoercion
>> org.apache.royale.events.IEventDispatcher
>> */
>>protected function
>> handleItemRemoved(event:CollectionEvent):void
>>{
>> @@ -141,6 +143,7 @@ package org.apache.royale.jewel.beads.itemRenderers
>> *  @playerversion Flash 10.2
>> *  @playerversion AIR 2.6
>> *  @productversion Royale 0.9.4
>> +*  @royaleignorecoercion
>> org.apache.royale.core.IDataProviderModel
>> */
>>public function get dataProviderModel(): IDataProviderModel
>>{
>> @@ -160,6 +163,7 @@ package org.apache.royale.jewel.beads.itemRenderers
>> *  @playerversion Flash 10.2
>> *  @playerversion AIR 2.6
>> *  @productversion Royale 0.9.4
>> +*  @royaleignorecoercion
>> org.apache.royale.core.IStrandWithModelView
>> */
>>public function get
>> itemRendererParent():IItemRendererParent
>>{
>> 
>> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: About differences between versions with/without Basic

2018-09-05 Thread Harbs
Hi Carlos,

This is very good news! :-)

I also noticed the empty selectors and I just committed a change to the 
compiler to remove empty selectors on minification. I don’t think it matters 
enough to remove them when the css is output for debug. Agree?

The classes brought in by DataContainerView are because Jewel DataGroup now 
subclasses DataContainerView to resolve the issues with those changes. We can 
probably fix this by declaring different interfaces in the Jewel CSS for the 
Jewel DataGroup.

I don’t know what’s bringing in StringItemRenderer. I’ll see if I can figure 
that out.

Thanks,
Harbs

> On Sep 5, 2018, at 12:17 PM, Carlos Rovira  wrote:
> 
> Hi,
> 
> Jewel sample has at this time many few differences when linked with Basic.
> 
> Diff merge tool is reporting mostly differences in classes we all know at
> this time: things related to changes in DataGroup, DataContainerView, and
> more... so I don't have that into account since is part of the changes
> added by this merge.
> 
> Other things that I think are not related to are:
> 
> 1.- for App.css just this:
> 
> .DataItemRenderer {
>}
> 
> .StringItemRenderer {
>cursor: pointer;
>padding-bottom: 4px;
>flex-grow: 1;
>flex-shrink: 0;
>padding-top: 4px;
> }
> 
> So good that fixes where removing most of this problems.
> 
> Far beyond that I'm finding empty selectors that should be removed:
> 
> .DataItemRenderer {
>}
> 
> 
> .Group {
>}
> 
> 
> 
> .Group {
>}
> 
> 
> .HGroup {
>}
> 
> 
> .VGroup {
>}
> 
> 
> .Container {
>}
> 
> 
> .Image {
>}
> 
> 
> Notice that some are even duplicated like "Group"
> 
> 
> 2.- Regarding App.js
> 
> is very similar, we have around
> 
> *8-10 lines more of imports doesn't needed
> 
> * and this 2 pieces of code
> 
> 
> "org.apache.royale.html.DataContainer",
> function() {this["iBeadView"] =
> org.apache.royale.html.beads.DataContainerView;
> this["iItemRenderer"] =
> org.apache.royale.html.supportClasses.StringItemRenderer;
> this["iViewport"] = org.apache.royale.html.supportClasses.Viewport;
> this["iBeadLayout"] = org.apache.royale.html.beads.layouts.VerticalLayout;
> this["iBeadModel"] = org.apache.royale.html.beads.models.DataProviderModel;
> this["iItemRendererClassFactory"] =
> org.apache.royale.core.ItemRendererClassFactory;
> this["iViewportModel"] = org.apache.royale.html.beads.models.ViewportModel;
> this["iDataProviderItemRendererMapper"] =
> org.apache.royale.html.beads.DataItemRendererFactoryForArrayData},
> 0,
> 1,
> 
> ...
> 
> 
> "org.apache.royale.html.supportClasses.StringItemRenderer",
> function() {this["cursor"] = "pointer";
> this["paddingBottom"] = 4.0;
> this["flexGrow"] = 1.0;
> this["flexShrink"] = 0.0;
> this["iBeadController"] =
> org.apache.royale.html.beads.controllers.ItemRendererMouseController;
> this["paddingTop"] = 4.0},
> 0,
> 1,
> 
> 
> 
> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: GOOG::DEBUG

2018-09-07 Thread Harbs
OK. I’ll look into it.

> On Sep 7, 2018, at 8:35 AM, Alex Harui  wrote:
> 
> This seems to be causing problems.  The JewelExample is failing.  I think it 
> doesn't like the early exit before the rest parameter is handled.
> 
> I don't think we need to worry about this for SWF output.
> 
> There is a way to suppress asdoc tags.  It is JSClosureCompilerWrapper.java, 
> but I'd prefer we pick a name prefixed with royale.  @debug might get used by 
> some other framework some day.
> 
> But first, I'm not sure your idea is going to work in all cases.  See if you 
> get the same problem in JewelExample.
> 
> Thanks,
> -Alex
> 
> On 9/6/18, 3:53 PM, "Harbs"  wrote:
> 
>Well, actually I was only focused o JS output.
> 
>Not sure how to make this work for SWF output…
> 
>> On Sep 7, 2018, at 1:41 AM, Harbs  wrote:
>> 
>> I don’t know how to add a compiler test for this, but we now have a 
>> universal way of declaring a method debug-only.
> 
> 
> 



Re: GOOG::DEBUG

2018-09-07 Thread Harbs
It looks like the problem is caused by:
 * @param {...} rest

What would happen if we remove the @param or change it to @param {*=} rest?

Both of those work.

> On Sep 7, 2018, at 8:35 AM, Alex Harui  wrote:
> 
> But first, I'm not sure your idea is going to work in all cases.  See if you 
> get the same problem in JewelExample.



Re: GOOG::DEBUG

2018-09-07 Thread Harbs
I’m saying that a param defined as {…} confuses the closure compiler when you 
have the rest redefined as an array anywhere but the first line of the 
function. It seems like a bug in the closure compiler.

Changing:
rest = Array.prototype.slice.call(arguments, 0);
to:
var rest = Array.prototype.slice.call(arguments, 0);

also makes the error go away, but we do get a reassignment warning.

I’m not sure what declaring a @param as {…} actually accomplishes in terms of 
type checking.

> On Sep 7, 2018, at 10:02 AM, Alex Harui  wrote:
> 
> Are you saying some recent change to the compiler is now generating:
>@param {...} rest
> 
> If so, what changed caused that output?  If not, why did it not fail before?
> 
> We should be generating whatever Google says we should generate for rest 
> parameters.  Although I did ponder the impact of having Royale's trace not 
> take extra parameters.  Then folks would have to concat strings before 
> calling trace.
> 
> -Alex
> 
> On 9/6/18, 11:58 PM, "Harbs"  wrote:
> 
>It looks like the problem is caused by:
> * @param {...} rest
> 
>What would happen if we remove the @param or change it to @param {*=} rest?
> 
>Both of those work.
> 
>> On Sep 7, 2018, at 8:35 AM, Alex Harui  wrote:
>> 
>> But first, I'm not sure your idea is going to work in all cases.  See if you 
>> get the same problem in JewelExample.
> 
> 
> 



Re: GOOG::DEBUG

2018-09-08 Thread Harbs
I should have included a full explanation in my email.

I tried {…*} but I got the same error as with {…}.

{*} is not technically right as the arguments after the first is not declared, 
but I tested trace with multiple arguments with the change and the closure 
compiler did not complain. It’s the closest annotation I could come up with 
that does not cause the error. (i.e. the first argument is required) I can’t 
think of any downsides of leaving the rest of the arguments out. Can you think 
of an issue with it?

Maybe a better fix is to update the closure compiler? Not sure…

I just wanted to fix the build in the meantime.

Suggestions?

Harbs

> On Sep 7, 2018, at 7:14 PM, Alex Harui  wrote:
> 
> The fix does not look right to me.  Here are a link that indicates that 
> variable number of arguments should be using "...".
> 
> https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler
>  
> <https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler>
> 
> This link indicates that the annotation for trace should be {...*}
> 
> https://stackoverflow.com/questions/25474311/annotating-zero-or-more-parameters-with-any-type-for-google-closure-compiler
>  
> <https://stackoverflow.com/questions/25474311/annotating-zero-or-more-parameters-with-any-type-for-google-closure-compiler>
> 
> What document led you to believe you could just use {*}, which indicates only 
> one parameter.
> 
> Thanks,
> -Alex
> 
> On 9/7/18, 1:55 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>I just committed a fix for this.
> 
>We can discuss further, but at least the build should work…
> 
>> On Sep 7, 2018, at 10:55 AM, Carlos Rovira  wrote:
>> 
>> Right, I'm seeing as well JewelExample failing on compile
>> 
>> thanks
>> 
>> El vie., 7 sept. 2018 a las 9:13, Harbs () escribió:
>> 
>>> I’m saying that a param defined as {…} confuses the closure compiler when
>>> you have the rest redefined as an array anywhere but the first line of the
>>> function. It seems like a bug in the closure compiler.
>>> 
>>> Changing:
>>> rest = Array.prototype.slice.call(arguments, 0);
>>> to:
>>> var rest = Array.prototype.slice.call(arguments, 0);
>>> 
>>> also makes the error go away, but we do get a reassignment warning.
>>> 
>>> I’m not sure what declaring a @param as {…} actually accomplishes in terms
>>> of type checking.
>>> 
>>>> On Sep 7, 2018, at 10:02 AM, Alex Harui 
>>> wrote:
>>>> 
>>>> Are you saying some recent change to the compiler is now generating:
>>>>  @param {...} rest
>>>> 
>>>> If so, what changed caused that output?  If not, why did it not fail
>>> before?
>>>> 
>>>> We should be generating whatever Google says we should generate for rest
>>> parameters.  Although I did ponder the impact of having Royale's trace not
>>> take extra parameters.  Then folks would have to concat strings before
>>> calling trace.
>>>> 
>>>> -Alex
>>>> 
>>>> On 9/6/18, 11:58 PM, "Harbs"  wrote:
>>>> 
>>>>  It looks like the problem is caused by:
>>>>   * @param {...} rest
>>>> 
>>>>  What would happen if we remove the @param or change it to @param {*=}
>>> rest?
>>>> 
>>>>  Both of those work.
>>>> 
>>>>> On Sep 7, 2018, at 8:35 AM, Alex Harui 
>>> wrote:
>>>>> 
>>>>> But first, I'm not sure your idea is going to work in all cases.  See
>>> if you get the same problem in JewelExample.
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> -- 
>> Carlos Rovira
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosroviradata=02%7C01%7Caharui%40adobe.com%7C2f5d8746f67b4b5ea95308d6149fad18%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636719073367810463sdata=3n3iyay30uyD88Q2nQBGT0v4LnV9sEkRGPhdteCqvME%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosroviradata=02%7C01%7Caharui%40adobe.com%7C2f5d8746f67b4b5ea95308d6149fad18%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636719073367810463sdata=3n3iyay30uyD88Q2nQBGT0v4LnV9sEkRGPhdteCqvME%3Dreserved=0>


mx.controls.RichTextEditor

2018-09-06 Thread Harbs
There is both an mxml file and an as file defining mx.controls.RichTextEditor.

This is causing a compiler warning.

The mxml version looks more complete. Should the as file be removed? Or should 
the as version be completed and remove the mxml one?

Thanks,
Harbs

Re: [Discuss] Start release process 0.9.3

2018-09-06 Thread Harbs
I just tried compiling tourdeflexmodules.

I’m getting an error on  On Sep 6, 2018, at 10:27 AM, Alex Harui  wrote:
> 
> For Windows users, if you are not using Internet Explorer, you may still need 
> to open IE or go to Internet Options in Control Panel and clear its cache.
> 
> HTH,
> -Alex
> 
> On 9/6/18, 12:08 AM, "Piotr Zarzycki"  wrote:
> 
>Hi Guys,
> 
>I was trying to check Tour De Flex if it has the same issue as the rest of
>MX examples. In order to do that I would like to build Framework using ANT.
>I got it working couple of days ago, but now it's constantly failing. Pixel
>blender is downloaded corrupted. [1] Do you have any idea why it is happen
>?
> 
>When I reach url directly through the browser I'm able to download good
>file.
> 
>[1] 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FLsmzdata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265395366sdata=%2BTmMdx3n4MiAV%2FaIy1DUH5mc8Ka4bqXPfKoBZ%2FiWyGI%3Dreserved=0
> 
>Thanks,
>Piotr
> 
>wt., 4 wrz 2018 o 15:57 Piotr Zarzycki 
>napisał(a):
> 
>> It looks like main application is using ApplicationLayout, but it is not
>> ILayoutHost type.
>> 
>> wt., 4 wrz 2018 o 15:35 Piotr Zarzycki 
>> napisał(a):
>> 
>>> It looks like there is a missing Layout for main application, because
>>> that function returns null:
>>> 
>>> var /** @type {org.apache.royale.core.ILayoutHost} */ viewBead =
>>> this.host.getLayoutHost();
>>> 
>>> wt., 4 wrz 2018 o 15:25 Piotr Zarzycki 
>>> napisał(a):
>>> 
>>>> Harbs,
>>>> 
>>>> Before I go to tour de flex I decided to build MX Hello World - using
>>>> Maven. [1] I'm getting exception in the Chrome console [2]. Do you have
>>>> idea what it could be ?
>>>> 
>>>> [1]
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Ftree%2Ffeature%2Fnew_merge%2Fexamples%2Fmxroyale%2FHelloWorlddata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265405371sdata=8J9YgTOS3toSCvnD9GPNkkPJ905%2FYFwtZ5n9FRI8%2Bso%3Dreserved=0
>>>> [2] 
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F2EBQdata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265405371sdata=kFunEkzHynCs%2FMqFa9DMsDDTthZmVx%2FY%2BMRNQ9W5TSw%3Dreserved=0
>>>> 
>>>> Thanks,
>>>> Piotr
>>>> 
>>>> 
>>>> wt., 4 wrz 2018 o 14:52 Carlos Rovira 
>>>> napisał(a):
>>>> 
>>>>> royale-confie.xml wasn't in distribution folder, so it was not copied.
>>>>> I think the way Chris made distribution was copy a version of some
>>>>> file-template.xml and a duplicate without "-template" in the name.
>>>>> So I added those files, but still don't get VSCode works ok
>>>>> 
>>>>> regarding "royale-asjs" folder, I tried to run "ant -f
>>>>> InstallAdobeSDKs.xml" in royale-asjs folder and this added AIR sdk to
>>>>> this
>>>>> folder, but VSCode doesn't recognize Royale-asjs folder as a SDK. I'm a
>>>>> but
>>>>> loose here or maybe I'm not understanding how you create your local SDK
>>>>> to
>>>>> feed VSCode :?
>>>>> 
>>>>> thanks
>>>>> 
>>>>> El mar., 4 sept. 2018 a las 12:56, Harbs ()
>>>>> escribió:
>>>>> 
>>>>>> Yes. royale-asjs.
>>>>>> 
>>>>>> Does Maven copy the royale-config.xml file? That’s required and is
>>>>> done by
>>>>>> the ant build.
>>>>>> 
>>>>>>> On Sep 4, 2018, at 1:30 PM, Carlos Rovira 
>>>>>> wrote:
>>>>>>> 
>>>>>>> mmm "asjs" folder is "royale-asjs" ?
>>>>>>> If I try to click in VSCode the SDK button (bottom-right) and click
>>>>> then
>>>>>>> "Add more SDKs to this list..." (button on top of VSCode) and go to
>>>>>>> "royale-asjs" it's not recognized as a valid SDK. Or are you talking
>>>>>> about
>>>>&g

Re: [Discuss] Start release process 0.9.3

2018-09-06 Thread Harbs
OK. Done.

> On Sep 6, 2018, at 4:20 PM, Piotr Zarzycki  wrote:
> 
> I'm ok with merging back to develop, since everything seems to be working.



Re: [Discuss] Start release process 0.9.3

2018-09-06 Thread Harbs
I have Tour de Flex compiled on my machine, and I can load the Tour de Flex app 
in JS.

However, none of the examples actually seem to work.

Can I assume that’s to be expected?

If yes, I think it’s time to merge back into develop and move the MXRoyale 
development over to develop as well.

Harbs

> On Sep 6, 2018, at 12:46 PM, Piotr Zarzycki  wrote:
> 
> Harbs,
> 
> I will need your assistance with getting up Your Dr Flex. I will still try
> ant build etc, but don't want to spend to much time on this if others have
> it working.
> 
> Thanks for checking!
> Piotr
> 
> On Thu, Sep 6, 2018, 11:13 AM Harbs  wrote:
> 
>> I just tried compiling tourdeflexmodules.
>> 
>> I’m getting an error on > unexpected”.
>> 
>> This makes sense because I don’t see BubbleChart anywhere. Did that get
>> lost somewhere or was it never created?
>> 
>>> On Sep 6, 2018, at 10:27 AM, Alex Harui 
>> wrote:
>>> 
>>> For Windows users, if you are not using Internet Explorer, you may still
>> need to open IE or go to Internet Options in Control Panel and clear its
>> cache.
>>> 
>>> HTH,
>>> -Alex
>>> 
>>> On 9/6/18, 12:08 AM, "Piotr Zarzycki" 
>> wrote:
>>> 
>>>   Hi Guys,
>>> 
>>>   I was trying to check Tour De Flex if it has the same issue as the
>> rest of
>>>   MX examples. In order to do that I would like to build Framework
>> using ANT.
>>>   I got it working couple of days ago, but now it's constantly failing.
>> Pixel
>>>   blender is downloaded corrupted. [1] Do you have any idea why it is
>> happen
>>>   ?
>>> 
>>>   When I reach url directly through the browser I'm able to download
>> good
>>>   file.
>>> 
>>>   [1]
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FLsmzdata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265395366sdata=%2BTmMdx3n4MiAV%2FaIy1DUH5mc8Ka4bqXPfKoBZ%2FiWyGI%3Dreserved=0
>>> 
>>>   Thanks,
>>>   Piotr
>>> 
>>>   wt., 4 wrz 2018 o 15:57 Piotr Zarzycki 
>>>   napisał(a):
>>> 
>>>> It looks like main application is using ApplicationLayout, but it is not
>>>> ILayoutHost type.
>>>> 
>>>> wt., 4 wrz 2018 o 15:35 Piotr Zarzycki 
>>>> napisał(a):
>>>> 
>>>>> It looks like there is a missing Layout for main application, because
>>>>> that function returns null:
>>>>> 
>>>>> var /** @type {org.apache.royale.core.ILayoutHost} */ viewBead =
>>>>> this.host.getLayoutHost();
>>>>> 
>>>>> wt., 4 wrz 2018 o 15:25 Piotr Zarzycki 
>>>>> napisał(a):
>>>>> 
>>>>>> Harbs,
>>>>>> 
>>>>>> Before I go to tour de flex I decided to build MX Hello World - using
>>>>>> Maven. [1] I'm getting exception in the Chrome console [2]. Do you
>> have
>>>>>> idea what it could be ?
>>>>>> 
>>>>>> [1]
>>>>>> 
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Ftree%2Ffeature%2Fnew_merge%2Fexamples%2Fmxroyale%2FHelloWorlddata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265405371sdata=8J9YgTOS3toSCvnD9GPNkkPJ905%2FYFwtZ5n9FRI8%2Bso%3Dreserved=0
>>>>>> [2]
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F2EBQdata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265405371sdata=kFunEkzHynCs%2FMqFa9DMsDDTthZmVx%2FY%2BMRNQ9W5TSw%3Dreserved=0
>>>>>> 
>>>>>> Thanks,
>>>>>> Piotr
>>>>>> 
>>>>>> 
>>>>>> wt., 4 wrz 2018 o 14:52 Carlos Rovira 
>>>>>> napisał(a):
>>>>>> 
>>>>>>> royale-confie.xml wasn't in distribution folder, so it was not
>> copied.
>>>>>>> I think the way Chris made distribution was copy a version of some
>>>>>>> file-template.xml and a duplicate without "-template" in the name.
>>>>>>> So I added those files, but still don't get VSCode works ok
>>>>>>> 
>>>>>>> regarding "royale-asjs" folder, I tried to run "an

Re: [royale-asjs] branch feature/MXRoyale updated: Update ApplicationDomain.as

2018-09-06 Thread Harbs
Dunno. It just seems odd to me that it was changed to always return null.

I was just asking. I was not following the work on this closely enough.

> On Sep 6, 2018, at 6:55 PM, Alex Harui  wrote:
> 
> Harbs, what was wrong with this commit?  It looked ok to me.  currentDomain 
> is static.
> 
> -Alex
> 
> On 9/6/18, 2:27 AM, "Alina Kazi"  <mailto:alina.k...@d-bz.com>> wrote:
> 
>Reverting this Commit. 
> 
>-Original Message-
>From: Harbs [mailto:harbs.li...@gmail.com] 
>Sent: Thursday, September 06, 2018 1:08 PM
>To: dev@royale.apache.org
>Subject: Re: [royale-asjs] branch feature/MXRoyale updated: Update
>ApplicationDomain.as
> 
>Why was the currentDomain setter removed?
> 
>> On Sep 6, 2018, at 8:15 AM, alinak...@apache.org wrote:
>> 
>> This is an automated email from the ASF dual-hosted git repository.
>> 
>> alinakazi pushed a commit to branch feature/MXRoyale in repository 
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7Cdc54f95ff680416e403308d613db0798%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718228774046734sdata=MPJsY9NB5fAp2dxzuKhowR1I6kkcYIqQKLTt4TGpxzg%3Dreserved=0
>>  
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7Cdc54f95ff680416e403308d613db0798%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718228774046734sdata=MPJsY9NB5fAp2dxzuKhowR1I6kkcYIqQKLTt4TGpxzg%3Dreserved=0>
>> 
>> 
>> The following commit(s) were added to refs/heads/feature/MXRoyale by this
>push:
>>new aa1b2d8  Update ApplicationDomain.as
>> aa1b2d8 is described below
>> 
>> commit aa1b2d855088e68d2dddc6e400dfb7281705ab2a
>> Author: alinakazi 
>> AuthorDate: Thu Sep 6 10:15:16 2018 +0500
>> 
>>   Update ApplicationDomain.as
>> ---
>> .../src/main/royale/mx/system/ApplicationDomain.as| 19
>---
>> 1 file changed, 8 insertions(+), 11 deletions(-)
>> 
>> diff --git 
>> a/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>> main.as 
>> b/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>> main.as
>> index 156ac2d..59474bf 100644
>> --- 
>> a/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>> main.as
>> +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/system/Applicati
>> +++ onDomain.as
>> @@ -47,25 +47,22 @@ public class ApplicationDomain extends Object
>> *  @playerversion AIR 1.1
>> *  @productversion Royale 0.0
>> */
>> -private var _currentDomain:Object;
>> -
>> -public function get currentDomain():Object
>> +
>> +
>> +public function ApplicationDomain()
>>{
>> -return _currentDomain;
>> +super();
>>}
>> -
>> -public function set currentDomain(obj:Object):void
>> -{
>> -_currentDomain = obj;
>> +
>> +public static function get currentDomain():ApplicationDomain
>> +{
>> +return null;
>>  }
>>  
>> -
>> -
>>public function ApplicationDomain()
>>{
>>super();
>>}
>> -
>> }
>> 
>> }



Re: [royale-asjs] branch feature/MXRoyale updated: Update ApplicationDomain.as

2018-09-06 Thread Harbs
I get that. I was just curious why the setter was removed…

Either way, if there’s some low hanging fruit in the emulation that you think I 
should work on, let me know… I don’t have a lot of time right now, but I’m 
happy to help with what I can.

Harbs

> On Sep 6, 2018, at 7:19 PM, Alex Harui  wrote:
> 
> Alina's primary goal is to get all of her code to compile, so many emulation 
> APIs are currently stubs that return null or 0 or "".  
> 
> My goal is to get this stuff to run, so I fill in the method bodies with real 
> code.  Hopefully other committers will pitch in soon.
> 
> -Alex
> 
> On 9/6/18, 9:17 AM, "Harbs"  <mailto:harbs.li...@gmail.com>> wrote:
> 
>Dunno. It just seems odd to me that it was changed to always return null.
> 
>I was just asking. I was not following the work on this closely enough.
> 
>> On Sep 6, 2018, at 6:55 PM, Alex Harui > <mailto:aha...@adobe.com.INVALID>> wrote:
>> 
>> Harbs, what was wrong with this commit?  It looked ok to me.  currentDomain 
>> is static.
>> 
>> -Alex
>> 
>> On 9/6/18, 2:27 AM, "Alina Kazi" > <mailto:alina.k...@d-bz.com> <mailto:alina.k...@d-bz.com 
>> <mailto:alina.k...@d-bz.com>>> wrote:
>> 
>>   Reverting this Commit. 
>> 
>>   -Original Message-
>>   From: Harbs [mailto:harbs.li...@gmail.com <mailto:harbs.li...@gmail.com>] 
>>   Sent: Thursday, September 06, 2018 1:08 PM
>>   To: dev@royale.apache.org <mailto:dev@royale.apache.org>
>>   Subject: Re: [royale-asjs] branch feature/MXRoyale updated: Update
>>   ApplicationDomain.as
>> 
>>   Why was the currentDomain setter removed?
>> 
>>> On Sep 6, 2018, at 8:15 AM, alinak...@apache.org 
>>> <mailto:alinak...@apache.org> wrote:
>>> 
>>> This is an automated email from the ASF dual-hosted git repository.
>>> 
>>> alinakazi pushed a commit to branch feature/MXRoyale in repository 
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7C133b6ea757c849b9a69308d614143aa5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718474443813011sdata=gjL3N4gZJkwiW%2Bj9w2Og%2BQnt93CcSmzHTdgBgrgyWhE%3Dreserved=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7C133b6ea757c849b9a69308d614143aa5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718474443813011sdata=gjL3N4gZJkwiW%2Bj9w2Og%2BQnt93CcSmzHTdgBgrgyWhE%3Dreserved=0>
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7C133b6ea757c849b9a69308d614143aa5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718474443813011sdata=gjL3N4gZJkwiW%2Bj9w2Og%2BQnt93CcSmzHTdgBgrgyWhE%3Dreserved=0
>>>  
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.gitdata=02%7C01%7Caharui%40adobe.com%7C133b6ea757c849b9a69308d614143aa5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718474443813011sdata=gjL3N4gZJkwiW%2Bj9w2Og%2BQnt93CcSmzHTdgBgrgyWhE%3Dreserved=0>>
>>> 
>>> 
>>> The following commit(s) were added to refs/heads/feature/MXRoyale by this
>>   push:
>>>   new aa1b2d8  Update ApplicationDomain.as
>>> aa1b2d8 is described below
>>> 
>>> commit aa1b2d855088e68d2dddc6e400dfb7281705ab2a
>>> Author: alinakazi mailto:alinakazi1...@gmail.com>>
>>> AuthorDate: Thu Sep 6 10:15:16 2018 +0500
>>> 
>>>  Update ApplicationDomain.as
>>> ---
>>> .../src/main/royale/mx/system/ApplicationDomain.as| 19
>>   ---
>>> 1 file changed, 8 insertions(+), 11 deletions(-)
>>> 
>>> diff --git 
>>> a/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>>> main.as 
>>> b/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>>> main.as
>>> index 156ac2d..59474bf 100644
>>> --- 
>>> a/frameworks/projects/MXRoyale/src/main/royale/mx/system/ApplicationDo
>>> main.as
>>> +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/system/Applicati
>>> +++ onDomain.as
>>> @@ -47,25 +47,22 @@ public class ApplicationDomain extends Object
>>>*  @playerversion AIR 1.1
>>>*  @productversion Royale 0.0
>>>*/
>>> -   private var _currentDomain:Object;
>>> -
>>> -   public function get currentDomain():Object
>>> +   
>>> +   
>>> +public function ApplicationDomain()
>>>   {
>>> -return _currentDomain;
>>> +super();
>>>   }
>>> -
>>> -public function set currentDomain(obj:Object):void
>>> -{
>>> -   _currentDomain = obj;
>>> +
>>> +   public static function get currentDomain():ApplicationDomain
>>> +   {
>>> +   return null;
>>> }
>>> 
>>> -   
>>> -   
>>>   public function ApplicationDomain()
>>>   {
>>>   super();
>>>   }
>>> -
>>> }
>>> 
>>> }



Re: GOOG::DEBUG

2018-09-06 Thread Harbs
In practice this is not quite happening because trace is output like this:

org.apache.royale.utils.Language.trace = function(rest) {
  rest = Array.prototype.slice.call(arguments, 0);
  var /** @type {*} */ theConsole;
  if (!goog.DEBUG)
return;
  theConsole = goog.global["console"];
  if (theConsole === undefined) {
if (typeof(window) !== "undefined") {
  theConsole = window.console;
} else if (typeof(console) !== "undefined") {
  theConsole = console;
}
  }
  try {
if (theConsole && theConsole.log) {
  theConsole.log.apply(theConsole, rest);
}
  } catch (e) {
  }
};

The first line does not get stripped out. If we could output that line after 
the good.DEBUG check, it would get completely stripped out…

org.apache.royale.utils.Language.trace = function(rest) {
  if (!goog.DEBUG)
return;
  rest = Array.prototype.slice.call(arguments, 0);
  var /** @type {*} */ theConsole;
  theConsole = goog.global["console"];
  if (theConsole === undefined) {
if (typeof(window) !== "undefined") {
  theConsole = window.console;
} else if (typeof(console) !== "undefined") {
  theConsole = console;
}
  }
  try {
if (theConsole && theConsole.log) {
  theConsole.log.apply(theConsole, rest);
}
  } catch (e) {
  }
};

I wonder if we should add a @debug comment to methods which would cause the 
compiler to automatically add if(!goog.DEBUG)return; to the first line of the 
function…

Harbs


> On Sep 7, 2018, at 12:20 AM, Harbs  wrote:
> 
> Language.trace has this at the beginning of the method:
> 
>   if (!goog.DEBUG) return;
> 
> That should cause the google compiler to optimize out the entire function 
> call.
> 
>> On Sep 7, 2018, at 12:15 AM, Alex Harui  wrote:
>> 
>> How do trace statements get removed from function bodies in release mode?
>> 
>> On 9/6/18, 2:13 PM, "Harbs"  wrote:
>> 
>>   I see code like this in MXRoyale:
>> 
>>  if (GOOG::DEBUG)
>>  trace("get_uid not implemented");
>> 
>>   I’m not aware of a reason to use compiler definitions for this.
>> 
>>   trace statements get stripped out on release. Why do we need this?
>> 
>>   Harbs
>> 
> 



Re: GOOG::DEBUG

2018-09-06 Thread Harbs
I also see ROYALE::DISPLAYOBJECT

What’s the deal with that?

> On Sep 7, 2018, at 12:13 AM, Harbs  wrote:
> 
> I see code like this in MXRoyale:
> 
>   if (GOOG::DEBUG)
>   trace("get_uid not implemented");
> 
> I’m not aware of a reason to use compiler definitions for this.
> 
> trace statements get stripped out on release. Why do we need this?
> 
> Harbs



Re: [Discuss] Start release process 0.9.3

2018-09-06 Thread Harbs
Yeah. Looks about the same.

MX HelloWorld is working.

> On Sep 6, 2018, at 4:05 PM, Piotr Zarzycki  wrote:
> 
> Harbs,
> 
> I think we should assume that you can see following results [1] - This has
> been build from MXRoyale branch.
> 
> What about MX HelloWorld example ? Is it working for you ?
> 
> [1]
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/TourDeFlexMigration/lastSuccessfulBuild/artifact/examples/mxroyale/tourdeflexmodules/bin/js-debug/index.html
> 
> Thanks for testing it!
> Piotr
> 
> czw., 6 wrz 2018 o 14:57 Harbs  napisał(a):
> 
>> I have Tour de Flex compiled on my machine, and I can load the Tour de
>> Flex app in JS.
>> 
>> However, none of the examples actually seem to work.
>> 
>> Can I assume that’s to be expected?
>> 
>> If yes, I think it’s time to merge back into develop and move the MXRoyale
>> development over to develop as well.
>> 
>> Harbs
>> 
>>> On Sep 6, 2018, at 12:46 PM, Piotr Zarzycki 
>> wrote:
>>> 
>>> Harbs,
>>> 
>>> I will need your assistance with getting up Your Dr Flex. I will still
>> try
>>> ant build etc, but don't want to spend to much time on this if others
>> have
>>> it working.
>>> 
>>> Thanks for checking!
>>> Piotr
>>> 
>>> On Thu, Sep 6, 2018, 11:13 AM Harbs  wrote:
>>> 
>>>> I just tried compiling tourdeflexmodules.
>>>> 
>>>> I’m getting an error on >>> unexpected”.
>>>> 
>>>> This makes sense because I don’t see BubbleChart anywhere. Did that get
>>>> lost somewhere or was it never created?
>>>> 
>>>>> On Sep 6, 2018, at 10:27 AM, Alex Harui 
>>>> wrote:
>>>>> 
>>>>> For Windows users, if you are not using Internet Explorer, you may
>> still
>>>> need to open IE or go to Internet Options in Control Panel and clear its
>>>> cache.
>>>>> 
>>>>> HTH,
>>>>> -Alex
>>>>> 
>>>>> On 9/6/18, 12:08 AM, "Piotr Zarzycki" 
>>>> wrote:
>>>>> 
>>>>>  Hi Guys,
>>>>> 
>>>>>  I was trying to check Tour De Flex if it has the same issue as the
>>>> rest of
>>>>>  MX examples. In order to do that I would like to build Framework
>>>> using ANT.
>>>>>  I got it working couple of days ago, but now it's constantly failing.
>>>> Pixel
>>>>>  blender is downloaded corrupted. [1] Do you have any idea why it is
>>>> happen
>>>>>  ?
>>>>> 
>>>>>  When I reach url directly through the browser I'm able to download
>>>> good
>>>>>  file.
>>>>> 
>>>>>  [1]
>>>> 
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FLsmzdata=02%7C01%7Caharui%40adobe.com%7Ce222bf89453d4257f4ca08d613c795c5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636718145265395366sdata=%2BTmMdx3n4MiAV%2FaIy1DUH5mc8Ka4bqXPfKoBZ%2FiWyGI%3Dreserved=0
>>>>> 
>>>>>  Thanks,
>>>>>  Piotr
>>>>> 
>>>>>  wt., 4 wrz 2018 o 15:57 Piotr Zarzycki 
>>>>>  napisał(a):
>>>>> 
>>>>>> It looks like main application is using ApplicationLayout, but it is
>> not
>>>>>> ILayoutHost type.
>>>>>> 
>>>>>> wt., 4 wrz 2018 o 15:35 Piotr Zarzycki 
>>>>>> napisał(a):
>>>>>> 
>>>>>>> It looks like there is a missing Layout for main application, because
>>>>>>> that function returns null:
>>>>>>> 
>>>>>>> var /** @type {org.apache.royale.core.ILayoutHost} */ viewBead =
>>>>>>> this.host.getLayoutHost();
>>>>>>> 
>>>>>>> wt., 4 wrz 2018 o 15:25 Piotr Zarzycki 
>>>>>>> napisał(a):
>>>>>>> 
>>>>>>>> Harbs,
>>>>>>>> 
>>>>>>>> Before I go to tour de flex I decided to build MX Hello World -
>> using
>>>>>>>> Maven. [1] I'm getting exception in the Chrome console [2]. Do you
>>>> have
>>>>>>>> idea what it could be ?
>>>>>>>> 
>>>>>>>> [1]
>>>>>>>> 
>>>> 
>> https://na01.safelinks.pr

<    1   2   3   4   5   6   7   8   9   10   >