Re: Issues with EventDispatcher in JS

2022-03-08 Thread Greg Dove
In the absence of anything suggesting otherwise, I have addressed this in a
commit today.
I had toyed with the idea of trying to change all the dispatchEvent(event)
sites that are redispatching to dispatchEvent(event.cloneEvent()), but that
seems wrong because it is less reliable in terms and maintainability and
also still means that the EventDispatcher dispatchEvent method is behaving
differently to how it should behave.





On Tue, Mar 1, 2022 at 11:31 AM Greg Dove  wrote:

>
> Sorry I sent that last message accidentally before finishing it...
>
> To achieve the same thing in Royale, we need to make the following change
> in org.apache.royale.events.EventDispatcher:
>
> at location [1]
>
> else if ("target" in event1) {
>if (event1.target && "cloneEvent" in event1) {
>   event1 = event1.cloneEvent();
>}
>event1.target = _dispatcher;
> }
>
> Can anyone see issues with addressing this? There are quite a few cases
> where this is needed in the emulation code.
>
>
>
>
>
> 1.
> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Core/src/main/royale/org/apache/royale/events/EventDispatcher.as#L87
>
>
> On Tue, Mar 1, 2022 at 11:28 AM Greg Dove  wrote:
>
>>
>> for any example that listens and re-dispatches an event in Royale, eg:
>>
>>
>> public function collectionChangeHandler(event:CollectionEvent):void{
>>   ... other code ...
>>   else if (ce.kind == CollectionEventKind.RESET)
>> {
>>   ... other code ...
>> dispatchEvent(event);
>> }
>>   else if  ... other code ...
>> }
>>
>> Currently in AVM this will work as it did before. But in Royale it does
>> not, it will mutate the original event by reseting the target to the
>> current dispatcher.
>> This is because the AVM EventDispatcher (I assume) calls the clone()
>> method on the event, redispatching a new instance from the dispatcher.
>>
>> To achieve the same thing in Royale, we need to make the following change
>> in org.apache.royale.events.EventDispatcher:
>>
>> at location [1]
>>
>> else if ("target" in event1) {
>>if (event1.target && "cloneEvent" in event1) {
>>   event1 = event1.cloneEvent();
>>}
>>
>> }
>>
>>
>>
>>
>>
>>
>> 1.
>> https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Core/src/main/royale/org/apache/royale/events/EventDispatcher.as#L87
>>
>>
>>


[VOTE] Release Apache Royale 0.9.9 RC2

2022-03-08 Thread apacheroyaleci
Hi,
This is the vote for the 0.9.9 release of Apache Royale.  The release candidate 
can be found here;
https://dist.apache.org/repos/dist/dev/royale/0.9.9/rc2/

Before voting please review the section,'What are the ASF requirements on 
approving a release?', at: 
http://www.apache.org/dev/release.html#approving-a-release

At a minimum you would be expected to check that:
- SHA and signed packages are correct
- README, RELEASE_NOTES, NOTICE and LICENSE files are all fine
- That the build script completes successfully
- That you can compile and crosscompile a simple example using the SDK.

The KEYS file is at https://dist.apache.org/repos/dist/release/royale/KEYS

The source package is a combination of the 3 main Royale repos.

To use the binary package, unzip it into a folder. The -js package is 
ready-to-use in an IDE or command-line. If you need SWF output, use the
-js-swf package and use Apache Ant to run the InstallAdobeSDKs script via:
ant -f InstallAdobeSDKs.xml

You may also get the binarypackages via NPM. The -js package can be installed 
via:
npm install 
https://dist.apache.org/repos/dist/dev/royale/0.9.9/rc2/binaries/apache-royale-0.9.9-bin-js.tar.gz

The full package with SWF support can be installed via:

npm install 
https://dist.apache.org/repos/dist/dev/royale/0.9.9/rc2/binaries/apache-royale-0.9.9-bin-js-swf.tar.gz

Maven artifacts are staged here: 
https://repository.apache.org/content/repositories/orgapacheroyale-1089

Please vote to approve this release:
+1 Approve the release
-1 Disapprove the release (please provide specific comments to why)

This vote will be open for 72 hours or until a result can be called.

The vote passes if there is:
- At least 3 +1 votes from the PMC
- More positive votes than negative votes

Remember that this is a 'beta-quality' release so expect there will be many 
bugs found. IMO the goal is not to try to find and fix bugs in the RC, but to 
make sure we have the packaging right, and enough functionality that folks will 
have some success trying to use it.  People who are not in PMC are also 
encouraged to test out the release and vote, although their votes will not be 
binding, they can influence how the PMC votes.

When voting please indicate what OS, IDE, Flash Player version and AIR version 
you tested with.  

For your convenience, there is an ant script that automates the common steps to 
validate a release.  Instead of individually downloading the package and 
signature files, unzipping, etc, you can instead:
1) create an empty folder,
2) download into that folder this file:
https://dist.apache.org/repos/dist/dev/royale/0.9.9/rc2/ApproveRoyale.xml
3) run the script:
   ant -e -f ApproveRoyale.xml -Drelease.version=0.9.9 -Drc=2
   If you want to test SWF support during the approval, use:
   ant -e -f ApproveRoyale.xml -Drelease.version=0.9.9 -Drc=2 -Duse-flash=true

You are not required to use this script, and more testing of the packages and 
build results are always encouraged.

Please put all discussion about this release in the DISCUSSION thread not this 
VOTE thread.

Thanks,
Yishay Weiss

[DISCUSS] Discuss Release Apache Royale 0.9.9 RC2

2022-03-08 Thread apacheroyaleci
This is the discussion thread.

Thanks,
Yishay Weiss