Re: List Item renderer Click event finds a component in its way

2018-07-03 Thread Carlos Rovira
Hi Alex,

thanks for the explanation, so if I understand right, there's not problem
with currentTarget, only that I was trying to use in an incorrect way.
And that the right way to deal with this concrete behavior is through
CHANGE event like I finaly did.

I'm ok as well with the fact that itemClicked is something not needed in
the most basic version to make it PAYG.

Thanks! :)



2018-07-03 18:11 GMT+02:00 Alex Harui :

> Hi Carlos,
>
> If I understand the code correctly, you are getting null because you are
> listening for click on Navigation not each individual NavigationRenderer.
> currentTarget will be the Navigation.  The way currentTarget works is
> specified by the W3C, not us.
>
> This is a good example of how each layer in the DOM should be responsible
> for dispatching higher and higher-order events.  I think you mentioned
> upthread that the NavigationRenderer might have widgets in it that when
> clicked, aren't supposed to change the Navigation's selection.  Having
> Navigation listen for click on itself or on its NavigationRenderers is not
> a recommended practice, because MouseEvent clicks bubble so any click on
> any widget in the renderer, regardless off what that click means will be
> seen by click handlers higher in the DOM. So, higher levels in the DOM like
> Navigation should rarely listen for low-level events like "click".
> Instead, each NavigationRenderer should abstract the click events and
> determine which ones mean that the renderer was clicked and dispatch an
> itemClick event from the NavigationRenderer. And the selection management
> code for the Navigator should be listening for itemClick and translate that
> into a "change" event that says that it received an itemClick that changed
> the selection.  Click, itemClick and "change" are events with increasingly
> higher-order semantics/meaning, and provide abstractions that allow for
> more complex renderers to interact with the mouse in ways that don't affect
> selection.
>
> The most basic List would not redispatch itemClick "just-in-case".  That
> would not be PAYG.  Some other version of List could if folks actually need
> it.  Instead, as you discovered, using the appropriate level of event for
> the control means that you don't have to worry about the low-level events
> that add up to the event that really was the one you wanted.
>
> HTH,
> -Alex
>
> On 7/3/18, 1:05 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
>  wrote:
>
> Hi Alex,
>
> taking into account the code from JewelExample I just posted. This
> code:
>
> private function clickHandler(event:MouseEvent):void
> {
> var renderer:INavigationRenderer = event.currentTarget as
> INavigationRenderer;
> trace(renderer);
> }
>
> shows a trace = null, whatever place you click on the renderer (in the
> subcomponents or directly in the renderer). event.target is right but
> only
> in the renderer as expected.
>
> So it seems currentTarget is not working right at least in List
> component.
>
> Thanks
>
>
> 2018-07-03 4:10 GMT+02:00 Alex Harui :
>
> > If event.currentTarget is not working, we need to make it work.
> That is
> > the recommended way to handle bubbling of events.  The browsers and
> Flash
> > work that way so folks will expect it to work.
> >
> > The List's change event is not a bubbling event.  Only interaction
> events
> > like Mouse and Keyboard events should bubble.  There were lots of
> folks
> > overusing bubbling in old Flex code, but in Royale we should
> discourage
> > it.  Instead each layer of the DOM should dispatch an appropriate
> > higher-level semantic event.  IOW, while you can "click" anywhere in
> an
> > item renderer, logic in the item renderer gets to determine whether
> to
> > dispatch a higher-level semantic event like "itemClick" and
> "itemClick"
> > events should not bubble.  Some higher-level layer might listen for
> > "itemClick" and turn it into "rowClicked" for a DataGrid, and even
> > higher-level might turn that into "change" or "selectionChange".
> >
> > So, IMO, instead of trying some new mechanism, it would be better to
> > understand why currentTarget is not working for Mouse/Keyboard
> events, or
> > add the code to propagate semantic events up the parent chain.
> >
> > My 2 cents,
> > -Alex
> >
> > On 7/2/18, 2:44 PM, "carlos.rov...@gmail.com on behalf of Carlos
> Rovira"
> > 
> wrote:
> >
> > Hi Yishay,
> >
> > thanks for let me know about it. I'm playing with it but I
> didn't get
> > to
> > work.
> > The case is that maybe List component is not ready for this yet.
> >
> > * event.currentTarget seems not exists in ItemRenderers
> > * I can use "itemClicked" event in a MXML List (I think is not
> set the
> > metadata and the rest of wiring)
> > * List change event doesn't work as 

Re: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Alex Harui
No worries.  I didn't see it either.  The Flash environment picked it up.

It also picked up that some of the tests may not be properly implemented.  The 
date test is using 'Sat Jun 30 23:59:59 GMT-0800 2018' and then Date.date+=1, 
but when you have the Flash SDK, it actually runs this code and it isn't doing 
the right thing, at least in my time zone.  I'm looking into that now.

It is hard to write tests for different time zones and different runtime 
environments.  I'm glad you got us most of the way there.

Later,
-Alex

On 7/3/18, 10:03 AM, "Frost, Andrew"  wrote:

Arg! Sorry, missed those when I was looking at the AS3 documentation...

I've not set my environment up to generate the SWF outputs, I might do that 
just for completion and to try to avoid such issues in the future!

Thanks

   Andrew


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

One glitch did show up after the merge, however.  The tests as configured 
will be run against playerglobal.swc for folks who are configured with the 
Flash/AIR SDKs.  I was expecting some other error, but the first thing it 
caught was that Date.day and Date.dayUTC are also read-only (makes sense given 
that it would not be obvious what to do if you change Tuesday to Wednesday.  It 
could be any Wednesday).

So I am going to add those two to the readonly list and update the tests to 
expect errors.  I will probably worry about making this set of tests always run 
against the JS-only config some other day.  Maybe you or some other volunteer 
wants to deal with it.  Probably not that important, IMO.

Anyway, still a great job and thanks for contributing.

-Alex

On 7/3/18, 9:31 AM, "Alex Harui"  wrote:

Hi Andrew,

I just accepted your pull requests.  Great Job!

Yes, I know it was more work than expected, but actually you did a lot 
more than just handle Date APIs.  You provided a way to specify readonly vars 
in externs and provided a pile of new tests.

Hope to see more contributions like these.

Thanks,
-Alex

On 7/3/18, 3:57 AM, "Frost, Andrew"  wrote:

Another update: the swfdumps are all done and it's all working fine 
and testing itself properly, I had to change another externc-config.xml file 
along with the other missing.js file to ensure that the 'testing' libraries are 
[roughly] equivalent to the actual files used in compilation..

Seems to be working to me and, I hope, is an acceptable solution. 
It required a lot more changes than I'd originally thought!

Pull requests are:
Typedefs: 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fclicktime.symantec.com%2Fa%2F1%2FH8du73qyd2P59dgc_NBig5kKS-MSuqeeLzkLnUuGc2g%3D%3Fd%3DXVM8wcUx4AVvvnx4aYpF00yk_Eyt9QZZF_c65XW-bGLlOqoBAmP4EZZZHcq3CxBBmKZpgajW8vxVFLmNQUwTkz-h3EmNKlq8UyFiYyklTfyKmivIVAaXa-6Uh22WNmrQPgipIQ5Bl1dYRZXx8v2FZ83ZkYErcY9kwfeFH2td0tJLDs3UuRtInu7Pg3ez7ZpidUYN_NR6xuesnpZ1PdAMKNZA0LhumZmir0NVprDmnsJ1BkaWAy6vXkO3GNuS4KHFrBe1VUQvY5uWuwGnqkMRvZA1N-hVF8cfY4bUQjZbFWjb9oxrU7AbQrtv2GodpVQWdsNUjpiczlfhcvVk8VhPuVjsGma93Tj8zXHuFsMOZxZYg1sTepHUbWoMXGQVGUmK1Jk6EAJ7zyL4lVjxzkNAJ31si4DjoouXLo5Q-D0w0B2oRQ14_ii9MfaNRuJ93qk%253D%26u%3Dhttps%253A%252F%252Fna01.safelinks.protection.outlook.com%252F%253Furl%253Dhttps%25253A%25252F%25252Fgithub.com%25252Fapache%25252Froyale-typedefs%25252Fpull%25252F2%2526data%253D02%25257C01%25257Caharui%252540adobe.com%25257C23fabd6b67b94e1dc16008d5e0d3d550%25257Cfa7b1b5a7b34438794aed2c178decee1%25257C0%25257C0%25257C636662122786567530%2526sdata%253DQ%25252FnpJJ657LMOQFUvytn5k4LWbVVw3YancGcyqU%25252F9MSI%25253D%2526reserved%253D0=02%7C01%7Caharui%40adobe.com%7Cd39e10024e8d42b49b5008d5e106e101%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662342019465396=YRzeG0EY17vQ7gX3UYr2T7oJIBjTICGoRc3fdXjVkTI%3D=0
Compiler: 

Jenkins build is back to normal : royale-typedefs #522

2018-07-03 Thread apacheroyaleci
See 




Build failed in Jenkins: royale-typedefs #521

2018-07-03 Thread apacheroyaleci
See 


Changes:

[UKINANFR] Adding ActionScript Date properties to the missing.js file, to avoid

[UKINANFR] Updating externc configuration to include support for read-only

--
Started by an SCM change
Building in workspace 

 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url 
 > https://github.com/apache/royale-typedefs.git # timeout=10
Fetching upstream changes from https://github.com/apache/royale-typedefs.git
 > git.exe --version # timeout=10
 > git.exe fetch --tags --progress 
 > https://github.com/apache/royale-typedefs.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git.exe rev-parse "refs/remotes/origin/develop^{commit}" # timeout=10
 > git.exe rev-parse "refs/remotes/origin/origin/develop^{commit}" # timeout=10
Checking out Revision 0c70777400dfe1963a51414f79fb103a5782a805 
(refs/remotes/origin/develop)
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 0c70777400dfe1963a51414f79fb103a5782a805
Commit message: "Merge pull request #2 from ajwfrost/develop"
 > git.exe rev-list --no-walk 399e6bb07276d5574b2dbf3dccafd68115819d98 # 
 > timeout=10
[royale-typedefs] $ cmd.exe /C "C:\apache\apache-ant-1.9.9\bin\ant.bat main && 
exit %%ERRORLEVEL%%"
Buildfile: 


main:

download:
 [echo] 

[unjar] Expanding: C:\Program Files 
(x86)\Jenkins\workspace\royale-compiler\compiler-jx\lib\google\closure-compiler\compiler.jar
 into 

[unzip] Expanding: 

 into 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/contrib/externs/svg.js
  [get] To: 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es3.js
  [get] To: 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/es6.js
  [get] To: 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_css.js
  [get] To: 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js
  [get] To: 

  [get] Getting: 
https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js
  [get] To: 


double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

double-check-file:
 [echo] ${env.ROYALE_DOWNLOAD_CACHE}
 [echo] Need file: ${still_no_file}

get-from-cache-if-needed:

fail-if-not-found:

preprocess:

externc:
 [java] Unknown tag:field-readonly
 [java] 0.466718 seconds
 [java] 
org.apache.royale.compiler.exceptions.ConfigurationException.UnknownVariable[var='field-readonly',
 line='178', 
source='
 [java] 

 (line: 178)
 [java] Picked up 

RE: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Frost, Andrew
Arg! Sorry, missed those when I was looking at the AS3 documentation...

I've not set my environment up to generate the SWF outputs, I might do that 
just for completion and to try to avoid such issues in the future!

Thanks

   Andrew


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

One glitch did show up after the merge, however.  The tests as configured will 
be run against playerglobal.swc for folks who are configured with the Flash/AIR 
SDKs.  I was expecting some other error, but the first thing it caught was that 
Date.day and Date.dayUTC are also read-only (makes sense given that it would 
not be obvious what to do if you change Tuesday to Wednesday.  It could be any 
Wednesday).

So I am going to add those two to the readonly list and update the tests to 
expect errors.  I will probably worry about making this set of tests always run 
against the JS-only config some other day.  Maybe you or some other volunteer 
wants to deal with it.  Probably not that important, IMO.

Anyway, still a great job and thanks for contributing.

-Alex

On 7/3/18, 9:31 AM, "Alex Harui"  wrote:

Hi Andrew,

I just accepted your pull requests.  Great Job!

Yes, I know it was more work than expected, but actually you did a lot more 
than just handle Date APIs.  You provided a way to specify readonly vars in 
externs and provided a pile of new tests.

Hope to see more contributions like these.

Thanks,
-Alex

On 7/3/18, 3:57 AM, "Frost, Andrew"  wrote:

Another update: the swfdumps are all done and it's all working fine and 
testing itself properly, I had to change another externc-config.xml file along 
with the other missing.js file to ensure that the 'testing' libraries are 
[roughly] equivalent to the actual files used in compilation..

Seems to be working to me and, I hope, is an acceptable solution. It 
required a lot more changes than I'd originally thought!

Pull requests are:
Typedefs: 
https://clicktime.symantec.com/a/1/H8du73qyd2P59dgc_NBig5kKS-MSuqeeLzkLnUuGc2g=?d=XVM8wcUx4AVvvnx4aYpF00yk_Eyt9QZZF_c65XW-bGLlOqoBAmP4EZZZHcq3CxBBmKZpgajW8vxVFLmNQUwTkz-h3EmNKlq8UyFiYyklTfyKmivIVAaXa-6Uh22WNmrQPgipIQ5Bl1dYRZXx8v2FZ83ZkYErcY9kwfeFH2td0tJLDs3UuRtInu7Pg3ez7ZpidUYN_NR6xuesnpZ1PdAMKNZA0LhumZmir0NVprDmnsJ1BkaWAy6vXkO3GNuS4KHFrBe1VUQvY5uWuwGnqkMRvZA1N-hVF8cfY4bUQjZbFWjb9oxrU7AbQrtv2GodpVQWdsNUjpiczlfhcvVk8VhPuVjsGma93Tj8zXHuFsMOZxZYg1sTepHUbWoMXGQVGUmK1Jk6EAJ7zyL4lVjxzkNAJ31si4DjoouXLo5Q-D0w0B2oRQ14_ii9MfaNRuJ93qk%3D=https%3A%2F%2Fna01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fapache%252Froyale-typedefs%252Fpull%252F2%26data%3D02%257C01%257Caharui%2540adobe.com%257C23fabd6b67b94e1dc16008d5e0d3d550%257Cfa7b1b5a7b34438794aed2c178decee1%257C0%257C0%257C636662122786567530%26sdata%3DQ%252FnpJJ657LMOQFUvytn5k4LWbVVw3YancGcyqU%252F9MSI%253D%26reserved%3D0
Compiler: 
https://clicktime.symantec.com/a/1/7ckP0xBvPXAikG7TS7fGtLEmtYORNspA7ffmJ61oStE=?d=XVM8wcUx4AVvvnx4aYpF00yk_Eyt9QZZF_c65XW-bGLlOqoBAmP4EZZZHcq3CxBBmKZpgajW8vxVFLmNQUwTkz-h3EmNKlq8UyFiYyklTfyKmivIVAaXa-6Uh22WNmrQPgipIQ5Bl1dYRZXx8v2FZ83ZkYErcY9kwfeFH2td0tJLDs3UuRtInu7Pg3ez7ZpidUYN_NR6xuesnpZ1PdAMKNZA0LhumZmir0NVprDmnsJ1BkaWAy6vXkO3GNuS4KHFrBe1VUQvY5uWuwGnqkMRvZA1N-hVF8cfY4bUQjZbFWjb9oxrU7AbQrtv2GodpVQWdsNUjpiczlfhcvVk8VhPuVjsGma93Tj8zXHuFsMOZxZYg1sTepHUbWoMXGQVGUmK1Jk6EAJ7zyL4lVjxzkNAJ31si4DjoouXLo5Q-D0w0B2oRQ14_ii9MfaNRuJ93qk%3D=https%3A%2F%2Fna01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fapache%252Froyale-compiler%252Fpull%252F46%26data%3D02%257C01%257Caharui%2540adobe.com%257C23fabd6b67b94e1dc16008d5e0d3d550%257Cfa7b1b5a7b34438794aed2c178decee1%257C0%257C0%257C636662122786567530%26sdata%3DL%252B3cknwmPbt4rvzFd7sDguzXXNspXHUdnVY4UVIPnW0%253D%26reserved%3D0

If you have the typedefs changes but not the compiler ones, then your 
Date properties will start coming through as undefined, as it will miss the 
transpiling bit where it converts e.g. "date.day" into "date.getDay()"...

Let me know of any issues (or please add to the discussion comments on 
the pull request instead?)

cheers

   Andrew



-Original Message-
From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
Sent: 02 July 2018 16:53
To: dev@royale.apache.org
Subject: [EXTERNAL] RE: Royale compiler not handling Date.fullYear etc

Ah - thank you! Will look at that later and create a pull request once 
everything is in there and testing itself properly..

cheers

   Andrew


-Original Message-
From: Alex Harui [mailto:aha...@adobe.com.INVALID] 
Sent: 02 

Re: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Alex Harui
One glitch did show up after the merge, however.  The tests as configured will 
be run against playerglobal.swc for folks who are configured with the Flash/AIR 
SDKs.  I was expecting some other error, but the first thing it caught was that 
Date.day and Date.dayUTC are also read-only (makes sense given that it would 
not be obvious what to do if you change Tuesday to Wednesday.  It could be any 
Wednesday).

So I am going to add those two to the readonly list and update the tests to 
expect errors.  I will probably worry about making this set of tests always run 
against the JS-only config some other day.  Maybe you or some other volunteer 
wants to deal with it.  Probably not that important, IMO.

Anyway, still a great job and thanks for contributing.

-Alex

On 7/3/18, 9:31 AM, "Alex Harui"  wrote:

Hi Andrew,

I just accepted your pull requests.  Great Job!

Yes, I know it was more work than expected, but actually you did a lot more 
than just handle Date APIs.  You provided a way to specify readonly vars in 
externs and provided a pile of new tests.

Hope to see more contributions like these.

Thanks,
-Alex

On 7/3/18, 3:57 AM, "Frost, Andrew"  wrote:

Another update: the swfdumps are all done and it's all working fine and 
testing itself properly, I had to change another externc-config.xml file along 
with the other missing.js file to ensure that the 'testing' libraries are 
[roughly] equivalent to the actual files used in compilation..

Seems to be working to me and, I hope, is an acceptable solution. It 
required a lot more changes than I'd originally thought!

Pull requests are:
Typedefs: 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-typedefs%2Fpull%2F2=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=Q%2FnpJJ657LMOQFUvytn5k4LWbVVw3YancGcyqU%2F9MSI%3D=0
Compiler: 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-compiler%2Fpull%2F46=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=L%2B3cknwmPbt4rvzFd7sDguzXXNspXHUdnVY4UVIPnW0%3D=0

If you have the typedefs changes but not the compiler ones, then your 
Date properties will start coming through as undefined, as it will miss the 
transpiling bit where it converts e.g. "date.day" into "date.getDay()"...

Let me know of any issues (or please add to the discussion comments on 
the pull request instead?)

cheers

   Andrew



-Original Message-
From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
Sent: 02 July 2018 16:53
To: dev@royale.apache.org
Subject: [EXTERNAL] RE: Royale compiler not handling Date.fullYear etc

Ah - thank you! Will look at that later and create a pull request once 
everything is in there and testing itself properly..

cheers

   Andrew


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

Ah yes, the swfdumps...

So when tests that produce a SWF run without the Flash playerglobal and 
standalone debugger, the test harness runs SWFDump and compares the output.  
The reference copies of the swfdumps are in 
compiler/src/test/resources/swfdumps and the files have a naming scheme I hope 
you can decode.  So, when you add a new test and it can't find the reference 
swfdump, it will dump what it found to make it easy for you to copy the swfdump 
and make it the reference copy.  So copy the console output of the swfdump and 
create the reference file and it should be ok after that.

Thanks,
-Alex

On 7/2/18, 8:42 AM, "Frost, Andrew"  wrote:

Latest on this:

With the changes in the compiler per the below suggestion 
(externc-config.xml and ExternCConfiguration changes), we can generate the 
below code (as extracted from js.swc):

public function get timezoneOffset():Number{
return (null);
}

And everything looks good... works well, we get the right warning 
out when we try to assign a value to timezoneOffset.
Changes are visible in 

Re: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Piotr Zarzycki
Congrats Andrew! Well done!

wt., 3 lip 2018 o 18:31 Alex Harui  napisał(a):

> Hi Andrew,
>
> I just accepted your pull requests.  Great Job!
>
> Yes, I know it was more work than expected, but actually you did a lot
> more than just handle Date APIs.  You provided a way to specify readonly
> vars in externs and provided a pile of new tests.
>
> Hope to see more contributions like these.
>
> Thanks,
> -Alex
>
> On 7/3/18, 3:57 AM, "Frost, Andrew"  wrote:
>
> Another update: the swfdumps are all done and it's all working fine
> and testing itself properly, I had to change another externc-config.xml
> file along with the other missing.js file to ensure that the 'testing'
> libraries are [roughly] equivalent to the actual files used in compilation..
>
> Seems to be working to me and, I hope, is an acceptable solution. It
> required a lot more changes than I'd originally thought!
>
> Pull requests are:
> Typedefs:
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-typedefs%2Fpull%2F2=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=Q%2FnpJJ657LMOQFUvytn5k4LWbVVw3YancGcyqU%2F9MSI%3D=0
> Compiler:
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-compiler%2Fpull%2F46=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=L%2B3cknwmPbt4rvzFd7sDguzXXNspXHUdnVY4UVIPnW0%3D=0
>
> If you have the typedefs changes but not the compiler ones, then your
> Date properties will start coming through as undefined, as it will miss the
> transpiling bit where it converts e.g. "date.day" into "date.getDay()"...
>
> Let me know of any issues (or please add to the discussion comments on
> the pull request instead?)
>
> cheers
>
>Andrew
>
>
>
> -Original Message-
> From: Frost, Andrew [mailto:andrew.fr...@harman.com]
> Sent: 02 July 2018 16:53
> To: dev@royale.apache.org
> Subject: [EXTERNAL] RE: Royale compiler not handling Date.fullYear etc
>
> Ah - thank you! Will look at that later and create a pull request once
> everything is in there and testing itself properly..
>
> cheers
>
>Andrew
>
>
> -Original Message-
> From: Alex Harui [mailto:aha...@adobe.com.INVALID]
> Sent: 02 July 2018 16:51
> To: dev@royale.apache.org
> Subject: [EXTERNAL] Re: Royale compiler not handling Date.fullYear etc
>
> Ah yes, the swfdumps...
>
> So when tests that produce a SWF run without the Flash playerglobal
> and standalone debugger, the test harness runs SWFDump and compares the
> output.  The reference copies of the swfdumps are in
> compiler/src/test/resources/swfdumps and the files have a naming scheme I
> hope you can decode.  So, when you add a new test and it can't find the
> reference swfdump, it will dump what it found to make it easy for you to
> copy the swfdump and make it the reference copy.  So copy the console
> output of the swfdump and create the reference file and it should be ok
> after that.
>
> Thanks,
> -Alex
>
> On 7/2/18, 8:42 AM, "Frost, Andrew"  wrote:
>
> Latest on this:
>
> With the changes in the compiler per the below suggestion
> (externc-config.xml and ExternCConfiguration changes), we can generate the
> below code (as extracted from js.swc):
>
> public function get timezoneOffset():Number{
> return (null);
> }
>
> And everything looks good... works well, we get the right warning
> out when we try to assign a value to timezoneOffset.
> Changes are visible in
> 

Re: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Alex Harui
Hi Andrew,

I just accepted your pull requests.  Great Job!

Yes, I know it was more work than expected, but actually you did a lot more 
than just handle Date APIs.  You provided a way to specify readonly vars in 
externs and provided a pile of new tests.

Hope to see more contributions like these.

Thanks,
-Alex

On 7/3/18, 3:57 AM, "Frost, Andrew"  wrote:

Another update: the swfdumps are all done and it's all working fine and 
testing itself properly, I had to change another externc-config.xml file along 
with the other missing.js file to ensure that the 'testing' libraries are 
[roughly] equivalent to the actual files used in compilation..

Seems to be working to me and, I hope, is an acceptable solution. It 
required a lot more changes than I'd originally thought!

Pull requests are:
Typedefs: 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-typedefs%2Fpull%2F2=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=Q%2FnpJJ657LMOQFUvytn5k4LWbVVw3YancGcyqU%2F9MSI%3D=0
Compiler: 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-compiler%2Fpull%2F46=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=L%2B3cknwmPbt4rvzFd7sDguzXXNspXHUdnVY4UVIPnW0%3D=0

If you have the typedefs changes but not the compiler ones, then your Date 
properties will start coming through as undefined, as it will miss the 
transpiling bit where it converts e.g. "date.day" into "date.getDay()"...

Let me know of any issues (or please add to the discussion comments on the 
pull request instead?)

cheers

   Andrew



-Original Message-
From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
Sent: 02 July 2018 16:53
To: dev@royale.apache.org
Subject: [EXTERNAL] RE: Royale compiler not handling Date.fullYear etc

Ah - thank you! Will look at that later and create a pull request once 
everything is in there and testing itself properly..

cheers

   Andrew


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

Ah yes, the swfdumps...

So when tests that produce a SWF run without the Flash playerglobal and 
standalone debugger, the test harness runs SWFDump and compares the output.  
The reference copies of the swfdumps are in 
compiler/src/test/resources/swfdumps and the files have a naming scheme I hope 
you can decode.  So, when you add a new test and it can't find the reference 
swfdump, it will dump what it found to make it easy for you to copy the swfdump 
and make it the reference copy.  So copy the console output of the swfdump and 
create the reference file and it should be ok after that.

Thanks,
-Alex

On 7/2/18, 8:42 AM, "Frost, Andrew"  wrote:

Latest on this:

With the changes in the compiler per the below suggestion 
(externc-config.xml and ExternCConfiguration changes), we can generate the 
below code (as extracted from js.swc):

public function get timezoneOffset():Number{
return (null);
}

And everything looks good... works well, we get the right warning out 
when we try to assign a value to timezoneOffset.
Changes are visible in 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fclicktime.symantec.com%2Fa%2F1%2FwviiW6QxLi8ypSnU5H09X2xjni7YMbYvK77LEkO5CDc%3D%3Fd%3D_zziaDODDuvZwC8YjWYfsPGmQ13A3Q5xBbMSUHKZIo34PLSaC9n5J08tWjYr684YeBkkWxnp2HcZdkgNzuQomI_AxW87-eGOUJ6BX3fpIq_85GevpLOLDtImXR9QSgOqRr8CPPdoqGLktBiwqfyZgvoybKudC2IK3zCmJoehcWoBmeXjp5BYTa2y0nIyvPd5uIG0WYm3JsJ2SYir9Lo6eyi-l_jT5qujCB9duN6TZDMw6d3nk9CU1DUlTgmpu8sTVpksO772_ZC0g-UQ0XAwzNaKvyauEqoa7Dn0h61XfQp5AqHmj6fdgrYEtUrlQQYC5UE3i8HxOcaCgOYGOEQ1GClok3NDQMETE1dyjN20C1N_Z-dWb1-qNMzyGi732Hk-nT_kq4IjD3YDuNeJwtk0wYZ42ik8c4M-nNHDMcZJfnVJf9_MWpQBY7o3JH2Vdg%253D%253D%26u%3Dhttps%253A%252F%252Fna01.safelinks.protection.outlook.com%252F%253Furl%253Dhttps%25253A%25252F%25252Fgithub.com%25252Fajwfrost%25252Froyale-compiler%25252Fcommit%25252F8157465fbe05022136ae7b405f316e89ee809c97%2526data%253D02%25257C01%25257Caharui%252540adobe.com%25257C71b34e8a1cca401a8f6d08d5e032645e%25257Cfa7b1b5a7b34438794aed2c178decee1%25257C0%25257C0%25257C636661429411013521%2526sdata%253D6DNQpiY0msNOA2%25252Fj0CiWEvv94X1JfDIacwOlm9nzqqE%25253D%2526reserved%253D0=02%7C01%7Caharui%40adobe.com%7C23fabd6b67b94e1dc16008d5e0d3d550%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636662122786567530=6hEzv0grDYsQ3AHulsQ15RkUFlAprJAhN7LDMUXsqso%3D=0
but I've not yet created the pull request on this project..

Re: List Item renderer Click event finds a component in its way

2018-07-03 Thread Alex Harui
Hi Carlos,

If I understand the code correctly, you are getting null because you are 
listening for click on Navigation not each individual NavigationRenderer.  
currentTarget will be the Navigation.  The way currentTarget works is specified 
by the W3C, not us.

This is a good example of how each layer in the DOM should be responsible for 
dispatching higher and higher-order events.  I think you mentioned upthread 
that the NavigationRenderer might have widgets in it that when clicked, aren't 
supposed to change the Navigation's selection.  Having Navigation listen for 
click on itself or on its NavigationRenderers is not a recommended practice, 
because MouseEvent clicks bubble so any click on any widget in the renderer, 
regardless off what that click means will be seen by click handlers higher in 
the DOM. So, higher levels in the DOM like Navigation should rarely listen for 
low-level events like "click".
Instead, each NavigationRenderer should abstract the click events and determine 
which ones mean that the renderer was clicked and dispatch an itemClick event 
from the NavigationRenderer. And the selection management code for the 
Navigator should be listening for itemClick and translate that into a "change" 
event that says that it received an itemClick that changed the selection.  
Click, itemClick and "change" are events with increasingly higher-order 
semantics/meaning, and provide abstractions that allow for more complex 
renderers to interact with the mouse in ways that don't affect selection.

The most basic List would not redispatch itemClick "just-in-case".  That would 
not be PAYG.  Some other version of List could if folks actually need it.  
Instead, as you discovered, using the appropriate level of event for the 
control means that you don't have to worry about the low-level events that add 
up to the event that really was the one you wanted.

HTH,
-Alex

On 7/3/18, 1:05 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" 
 wrote:

Hi Alex,

taking into account the code from JewelExample I just posted. This code:

private function clickHandler(event:MouseEvent):void
{
var renderer:INavigationRenderer = event.currentTarget as
INavigationRenderer;
trace(renderer);
}

shows a trace = null, whatever place you click on the renderer (in the
subcomponents or directly in the renderer). event.target is right but only
in the renderer as expected.

So it seems currentTarget is not working right at least in List component.

Thanks


2018-07-03 4:10 GMT+02:00 Alex Harui :

> If event.currentTarget is not working, we need to make it work.  That is
> the recommended way to handle bubbling of events.  The browsers and Flash
> work that way so folks will expect it to work.
>
> The List's change event is not a bubbling event.  Only interaction events
> like Mouse and Keyboard events should bubble.  There were lots of folks
> overusing bubbling in old Flex code, but in Royale we should discourage
> it.  Instead each layer of the DOM should dispatch an appropriate
> higher-level semantic event.  IOW, while you can "click" anywhere in an
> item renderer, logic in the item renderer gets to determine whether to
> dispatch a higher-level semantic event like "itemClick" and "itemClick"
> events should not bubble.  Some higher-level layer might listen for
> "itemClick" and turn it into "rowClicked" for a DataGrid, and even
> higher-level might turn that into "change" or "selectionChange".
>
> So, IMO, instead of trying some new mechanism, it would be better to
> understand why currentTarget is not working for Mouse/Keyboard events, or
> add the code to propagate semantic events up the parent chain.
>
> My 2 cents,
> -Alex
>
> On 7/2/18, 2:44 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
>  wrote:
>
> Hi Yishay,
>
> thanks for let me know about it. I'm playing with it but I didn't get
> to
> work.
> The case is that maybe List component is not ready for this yet.
>
> * event.currentTarget seems not exists in ItemRenderers
> * I can use "itemClicked" event in a MXML List (I think is not set the
> metadata and the rest of wiring)
> * List change event doesn't work as well.
>
>  Hope you or other could point me to a more elegant solution since
> right
> now, since for me the actual solution is a hack that must be converted
> to
> something more final.
>
> Thanks
>
>
>
> 2018-07-02 16:38 GMT+02:00 Yishay Weiss :
>
> > Take a look at ItemRendererMouseController.handleMouseUp() in
> Basic. It
> > uses currentTarget.
> >
> >
> >
> >
> >
> >
> >
> > 
> 

Re: List Item renderer Click event finds a component in its way

2018-07-03 Thread Carlos Rovira
Hi,

just solved the problem with this code in JewelExample changing to "CHANGE"
event:

import vos.NavigationLinkVO;
private function changeHandler(event:Event):void
{
var item:NavigationLinkVO = (event.target as Navigation).selectedItem as
NavigationLinkVO;
main.showContent(item.href);
drawer.close();
}

I think is more elegant than using MouseEvent, even probably the right way
to go.

But I think the problem it arise with MouseEvents, target, currentTarget
and itemClicked is still there. The problems I see are:

1.- itemClicked (and others of this kind) is not exposed in MXML for Lists,
Should this be added? If not maybe is hard to use it right?
2.- currentTarget in List elements is null, I think this is not right

I tried multiple ways to workaround this but nothing worked with MouseEvent
- Click handler in List, so I think others with better knowledge of how
events work and the underling components and implementation should take a
look at this and try to see if there's a problem as I say or maybe is me
missing something

btw, Drawer component is mostly done, although I want to do some more
things to make it more complete :)

thanks



2018-07-03 10:05 GMT+02:00 Carlos Rovira :

> Hi Alex,
>
> taking into account the code from JewelExample I just posted. This code:
>
> private function clickHandler(event:MouseEvent):void
> {
> var renderer:INavigationRenderer = event.currentTarget as
> INavigationRenderer;
> trace(renderer);
> }
>
> shows a trace = null, whatever place you click on the renderer (in the
> subcomponents or directly in the renderer). event.target is right but only
> in the renderer as expected.
>
> So it seems currentTarget is not working right at least in List component.
>
> Thanks
>
>
> 2018-07-03 4:10 GMT+02:00 Alex Harui :
>
>> If event.currentTarget is not working, we need to make it work.  That is
>> the recommended way to handle bubbling of events.  The browsers and Flash
>> work that way so folks will expect it to work.
>>
>> The List's change event is not a bubbling event.  Only interaction events
>> like Mouse and Keyboard events should bubble.  There were lots of folks
>> overusing bubbling in old Flex code, but in Royale we should discourage
>> it.  Instead each layer of the DOM should dispatch an appropriate
>> higher-level semantic event.  IOW, while you can "click" anywhere in an
>> item renderer, logic in the item renderer gets to determine whether to
>> dispatch a higher-level semantic event like "itemClick" and "itemClick"
>> events should not bubble.  Some higher-level layer might listen for
>> "itemClick" and turn it into "rowClicked" for a DataGrid, and even
>> higher-level might turn that into "change" or "selectionChange".
>>
>> So, IMO, instead of trying some new mechanism, it would be better to
>> understand why currentTarget is not working for Mouse/Keyboard events, or
>> add the code to propagate semantic events up the parent chain.
>>
>> My 2 cents,
>> -Alex
>>
>> On 7/2/18, 2:44 PM, "carlos.rov...@gmail.com on behalf of Carlos
>> Rovira" 
>> wrote:
>>
>> Hi Yishay,
>>
>> thanks for let me know about it. I'm playing with it but I didn't get
>> to
>> work.
>> The case is that maybe List component is not ready for this yet.
>>
>> * event.currentTarget seems not exists in ItemRenderers
>> * I can use "itemClicked" event in a MXML List (I think is not set the
>> metadata and the rest of wiring)
>> * List change event doesn't work as well.
>>
>>  Hope you or other could point me to a more elegant solution since
>> right
>> now, since for me the actual solution is a hack that must be
>> converted to
>> something more final.
>>
>> Thanks
>>
>>
>>
>> 2018-07-02 16:38 GMT+02:00 Yishay Weiss :
>>
>> > Take a look at ItemRendererMouseController.handleMouseUp() in
>> Basic. It
>> > uses currentTarget.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > 
>> > From: carlos.rov...@gmail.com  on behalf
>> of
>> > Carlos Rovira 
>> > Sent: Monday, July 2, 2018 5:27:08 PM
>> > To: dev@royale.apache.org
>> > Subject: List Item renderer Click event finds a component in its way
>> >
>> > Hi,
>> >
>> > what's the best way to handle a click event in a List when the Item
>> > renderer has some components that can interfere in the click event?
>> >
>> > I have an icon and a Label in the item renderer and if I click on
>> one of
>> > those "event.target" is logically set to this components.
>> >
>> > How to make "event.target" always resolve to the item-renderer,
>> even if I
>> > click in the label or the icon.
>> > If the label or the icon has a click event, then clicking on one of
>> those
>> > components should call it's own click handler, but if nothing is
>> set up, a
>> > click in any part of the renderer should call the list click event
>> handler.
>> >
>> > In JS I can set 

RE: Royale compiler not handling Date.fullYear etc

2018-07-03 Thread Frost, Andrew
Another update: the swfdumps are all done and it's all working fine and testing 
itself properly, I had to change another externc-config.xml file along with the 
other missing.js file to ensure that the 'testing' libraries are [roughly] 
equivalent to the actual files used in compilation..

Seems to be working to me and, I hope, is an acceptable solution. It required a 
lot more changes than I'd originally thought!

Pull requests are:
Typedefs: https://github.com/apache/royale-typedefs/pull/2
Compiler: https://github.com/apache/royale-compiler/pull/46

If you have the typedefs changes but not the compiler ones, then your Date 
properties will start coming through as undefined, as it will miss the 
transpiling bit where it converts e.g. "date.day" into "date.getDay()"...

Let me know of any issues (or please add to the discussion comments on the pull 
request instead?)

cheers

   Andrew



-Original Message-
From: Frost, Andrew [mailto:andrew.fr...@harman.com] 
Sent: 02 July 2018 16:53
To: dev@royale.apache.org
Subject: [EXTERNAL] RE: Royale compiler not handling Date.fullYear etc

Ah - thank you! Will look at that later and create a pull request once 
everything is in there and testing itself properly..

cheers

   Andrew


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

Ah yes, the swfdumps...

So when tests that produce a SWF run without the Flash playerglobal and 
standalone debugger, the test harness runs SWFDump and compares the output.  
The reference copies of the swfdumps are in 
compiler/src/test/resources/swfdumps and the files have a naming scheme I hope 
you can decode.  So, when you add a new test and it can't find the reference 
swfdump, it will dump what it found to make it easy for you to copy the swfdump 
and make it the reference copy.  So copy the console output of the swfdump and 
create the reference file and it should be ok after that.

Thanks,
-Alex

On 7/2/18, 8:42 AM, "Frost, Andrew"  wrote:

Latest on this:

With the changes in the compiler per the below suggestion 
(externc-config.xml and ExternCConfiguration changes), we can generate the 
below code (as extracted from js.swc):

public function get timezoneOffset():Number{
return (null);
}

And everything looks good... works well, we get the right warning out when 
we try to assign a value to timezoneOffset.
Changes are visible in 
https://clicktime.symantec.com/a/1/wviiW6QxLi8ypSnU5H09X2xjni7YMbYvK77LEkO5CDc=?d=_zziaDODDuvZwC8YjWYfsPGmQ13A3Q5xBbMSUHKZIo34PLSaC9n5J08tWjYr684YeBkkWxnp2HcZdkgNzuQomI_AxW87-eGOUJ6BX3fpIq_85GevpLOLDtImXR9QSgOqRr8CPPdoqGLktBiwqfyZgvoybKudC2IK3zCmJoehcWoBmeXjp5BYTa2y0nIyvPd5uIG0WYm3JsJ2SYir9Lo6eyi-l_jT5qujCB9duN6TZDMw6d3nk9CU1DUlTgmpu8sTVpksO772_ZC0g-UQ0XAwzNaKvyauEqoa7Dn0h61XfQp5AqHmj6fdgrYEtUrlQQYC5UE3i8HxOcaCgOYGOEQ1GClok3NDQMETE1dyjN20C1N_Z-dWb1-qNMzyGi732Hk-nT_kq4IjD3YDuNeJwtk0wYZ42ik8c4M-nNHDMcZJfnVJf9_MWpQBY7o3JH2Vdg%3D%3D=https%3A%2F%2Fna01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fajwfrost%252Froyale-compiler%252Fcommit%252F8157465fbe05022136ae7b405f316e89ee809c97%26data%3D02%257C01%257Caharui%2540adobe.com%257C71b34e8a1cca401a8f6d08d5e032645e%257Cfa7b1b5a7b34438794aed2c178decee1%257C0%257C0%257C636661429411013521%26sdata%3D6DNQpiY0msNOA2%252Fj0CiWEvv94X1JfDIacwOlm9nzqqE%253D%26reserved%3D0
but I've not yet created the pull request on this project..


In terms of testing: to properly test this, we need to add an external test 
for it (i.e. running through the full compile sequence), so I looked at where 
there are some current tests that do this:
royale-compiler\compiler\src\test\java\as\ASExpressionTests.java etc
and then copy/pasted one of these into a new file "ASDateTests.java". 
However this is causing weird errors: when I build the royale-compiler project 
without this file, I get:

tests:
[junit] Running as.ASExpressionTests
[junit] looking for C:\Work\Royale\royale-compiler\env.properties
[junit] environment property - FLEX_HOME = null
[junit] environment property - PLAYERGLOBAL_HOME = null
[junit] environment property - PLAYERGLOBAL_VERSION = 11.1
[junit] environment property - TLF_HOME = null
[junit] environment property - AIR_HOME = null
[junit] environment property - FLASHPLAYER_DEBUGGER = null
[junit] environment property - ASJS_HOME = C:\Work\Royale\royale-asjs
[junit] environment property - GOOG_HOME = null
[junit] Generating test:
[junit] Compiling test:
[junit] 
-external-library-path=C:\Work\Royale\royale-compiler\compiler-externc\target\js.swc
 
C:\Work\Royale\royale-compiler\compiler\target\junit-temp\ASExpressionTests7333543909053470191.as
 
[junit] 
[junit] 

Re: List Item renderer Click event finds a component in its way

2018-07-03 Thread Carlos Rovira
Hi Alex,

taking into account the code from JewelExample I just posted. This code:

private function clickHandler(event:MouseEvent):void
{
var renderer:INavigationRenderer = event.currentTarget as
INavigationRenderer;
trace(renderer);
}

shows a trace = null, whatever place you click on the renderer (in the
subcomponents or directly in the renderer). event.target is right but only
in the renderer as expected.

So it seems currentTarget is not working right at least in List component.

Thanks


2018-07-03 4:10 GMT+02:00 Alex Harui :

> If event.currentTarget is not working, we need to make it work.  That is
> the recommended way to handle bubbling of events.  The browsers and Flash
> work that way so folks will expect it to work.
>
> The List's change event is not a bubbling event.  Only interaction events
> like Mouse and Keyboard events should bubble.  There were lots of folks
> overusing bubbling in old Flex code, but in Royale we should discourage
> it.  Instead each layer of the DOM should dispatch an appropriate
> higher-level semantic event.  IOW, while you can "click" anywhere in an
> item renderer, logic in the item renderer gets to determine whether to
> dispatch a higher-level semantic event like "itemClick" and "itemClick"
> events should not bubble.  Some higher-level layer might listen for
> "itemClick" and turn it into "rowClicked" for a DataGrid, and even
> higher-level might turn that into "change" or "selectionChange".
>
> So, IMO, instead of trying some new mechanism, it would be better to
> understand why currentTarget is not working for Mouse/Keyboard events, or
> add the code to propagate semantic events up the parent chain.
>
> My 2 cents,
> -Alex
>
> On 7/2/18, 2:44 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
>  wrote:
>
> Hi Yishay,
>
> thanks for let me know about it. I'm playing with it but I didn't get
> to
> work.
> The case is that maybe List component is not ready for this yet.
>
> * event.currentTarget seems not exists in ItemRenderers
> * I can use "itemClicked" event in a MXML List (I think is not set the
> metadata and the rest of wiring)
> * List change event doesn't work as well.
>
>  Hope you or other could point me to a more elegant solution since
> right
> now, since for me the actual solution is a hack that must be converted
> to
> something more final.
>
> Thanks
>
>
>
> 2018-07-02 16:38 GMT+02:00 Yishay Weiss :
>
> > Take a look at ItemRendererMouseController.handleMouseUp() in
> Basic. It
> > uses currentTarget.
> >
> >
> >
> >
> >
> >
> >
> > 
> > From: carlos.rov...@gmail.com  on behalf of
> > Carlos Rovira 
> > Sent: Monday, July 2, 2018 5:27:08 PM
> > To: dev@royale.apache.org
> > Subject: List Item renderer Click event finds a component in its way
> >
> > Hi,
> >
> > what's the best way to handle a click event in a List when the Item
> > renderer has some components that can interfere in the click event?
> >
> > I have an icon and a Label in the item renderer and if I click on
> one of
> > those "event.target" is logically set to this components.
> >
> > How to make "event.target" always resolve to the item-renderer, even
> if I
> > click in the label or the icon.
> > If the label or the icon has a click event, then clicking on one of
> those
> > components should call it's own click handler, but if nothing is set
> up, a
> > click in any part of the renderer should call the list click event
> handler.
> >
> > In JS I can set pointer-events : none for sub components in item
> renderers
> > but does not seems the best way to handle this
> >
> > thanks
> >
> > --
> > Carlos Rovira
> > https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%
> 7C6a108592eeb643ebcf2b08d5e0650676%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636661646889224052=YbiK4qjpjqCpxmvP%2BHBytWFauyvIL%
> 2BloI7dxNOF6lew%3D=0
> >
>
>
>
> --
> Carlos Rovira
> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%
> 7C6a108592eeb643ebcf2b08d5e0650676%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636661646889224052=YbiK4qjpjqCpxmvP%2BHBytWFauyvIL%
> 2BloI7dxNOF6lew%3D=0
>
>
>


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


Re: List Item renderer Click event finds a component in its way

2018-07-03 Thread Carlos Rovira
Hi Yishay,

the following code is from JewelExample, you can run it to get the final
effect for convenience.

Problem: The new Drawer component has a Navigation component. Navigation is
a List that implements navigation behavior


...







and the click handler:





Navigation has NavigationLinkItemRenderer that use to handle "text" and
"href" (this props will change the name soon to something more generic)
since is an INavigationRenderer.

In JewlExample, I'm using an NavigationIconLinkItemRenderer that is an MXML
extension that adds an Icon and Span components.

When the user clicks on the Icon/Span components and the clickHandler gets
called, event.target is one of those components and not the ItemRenderer so
"renderer" is not the INavigationRenderer. If I click in some free space in
the renderer, all is ok, renderer is INavigationRenderer and renderer gets
the right value, entering the "if" and calling main.showContent(link), that
by the way is a container that has some "screens" or organized content and
hides all content while make visible only the selected content.

So how can should deal with this kind of issue?

Expected behavior: Users can add components to an item renderer (more
icons, more text...) and all this components should not interfere by
default with the click event. Only the components that has a click event
defined should take precedence over the item renderer click event.

Maybe I'm wrong and is not a click handler, but an itemClicked? but as I
stated "itemClicked" is not part of the events managed by List. If we want
to configure this event in a List in mxml we need to add this to List.

Thanks for your help

Carlos




2018-07-03 6:37 GMT+02:00 Yishay Weiss :

> Hi  Carlos,
>
>
>
> Can you post some example app so I can understand the problem? We’re using
> List in several places in our app, including label and icon renderers, and
> haven’t had this problem.
>
>
>
> 
> From: carlos.rov...@gmail.com  on behalf of
> Carlos Rovira 
> Sent: Tuesday, July 3, 2018 12:44:17 AM
> To: dev@royale.apache.org
> Subject: Re: List Item renderer Click event finds a component in its way
>
> Hi Yishay,
>
> thanks for let me know about it. I'm playing with it but I didn't get to
> work.
> The case is that maybe List component is not ready for this yet.
>
> * event.currentTarget seems not exists in ItemRenderers
> * I can use "itemClicked" event in a MXML List (I think is not set the
> metadata and the rest of wiring)
> * List change event doesn't work as well.
>
>  Hope you or other could point me to a more elegant solution since right
> now, since for me the actual solution is a hack that must be converted to
> something more final.
>
> Thanks
>
>
>
> 2018-07-02 16:38 GMT+02:00 Yishay Weiss :
>
> > Take a look at ItemRendererMouseController.handleMouseUp() in Basic. It
> > uses currentTarget.
> >
> >
> >
> >
> >
> >
> >
> > 
> > From: carlos.rov...@gmail.com  on behalf of
> > Carlos Rovira 
> > Sent: Monday, July 2, 2018 5:27:08 PM
> > To: dev@royale.apache.org
> > Subject: List Item renderer Click event finds a component in its way
> >
> > Hi,
> >
> > what's the best way to handle a click event in a List when the Item
> > renderer has some components that can interfere in the click event?
> >
> > I have an icon and a Label in the item renderer and if I click on one of
> > those "event.target" is logically set to this components.
> >
> > How to make "event.target" always resolve to the item-renderer, even if I
> > click in the label or the icon.
> > If the label or the icon has a click event, then clicking on one of those
> > components should call it's own click handler, but if nothing is set up,
> a
> > click in any part of the renderer should call the list click event
> handler.
> >
> > In JS I can set pointer-events : none for sub components in item
> renderers
> > but does not seems the best way to handle this
> >
> > thanks
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>



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


Re: Migrating Enterprise Flex Application

2018-07-03 Thread Alex Harui
Hi,

Yes, we would expect duplicates.  I was able to use Excel to group and subtotal 
duplicates.

At a quick glance, the list of APIs look like there is a lot of overlap with 
Alina's app so you should be able to leverage a lot of the work she and Shahid 
have done.

-Alex

On 7/2/18, 11:35 PM, "chembali"  wrote:

I fixed the compile errors and generated the api report for my first
component.  reportFlexUIPlatform.txt


 
. Please review it and let me know your comments. I will start working on
generating the api reports for other components. I would imagine that there
would be a bunch of duplicates in these api reports. 



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




Re: [MAVEN-BUILD] Royale-asjs - Build # 839 - Still Failing

2018-07-03 Thread Carlos Rovira
finaly this was not a bug, but a config issue. I forgot to remove looking
in "assets" folder. Completely forgot about this :)

2018-07-02 9:20 GMT+02:00 Carlos Rovira :

> Thanks Piotr,
> right, the build fails for the latest commit, although I think this is
> really a bug since I removed all files from "assets" folder in JewelTheme
> since are not used and this caused the fail.
> But "assets" should not be mandatory. I'll fill an issue in compiler as I
> have some time
>
>
>
> 2018-07-02 7:19 GMT+02:00 Piotr Zarzycki :
>
>> Hi Carlos,
>>
>> Your latest changes caused that fail ? Can you look ?
>>
>> Thanks,
>> Piotr
>>
>> niedz., 1 lip 2018 o 22:18 Apache Jenkins Server <
>> jenk...@builds.apache.org>
>> napisał(a):
>>
>> > The Apache Jenkins build system has built Royale-asjs (build #839)
>> >
>> > Status: Still Failing
>> >
>> > Check console output at https://builds.apache.org/job/Royale-asjs/839/
>> to
>> > view the results.
>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: *https://www.patreon.com/piotrzarzycki
>> *
>>
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>


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


Re: Migrating Enterprise Flex Application

2018-07-03 Thread chembali
I fixed the compile errors and generated the api report for my first
component.  reportFlexUIPlatform.txt

 
. Please review it and let me know your comments. I will start working on
generating the api reports for other components. I would imagine that there
would be a bunch of duplicates in these api reports. 



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