Re: [VOTE] Release Apache FlexJS 0.8.0 RC1

2017-06-10 Thread Harbs
+1
Package 
http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs_release_branch/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.8.0-src.tar.gz
Java 1.8
OS: Mac OS X x86_64 10.10.5
Source kit signatures match: y
Source kit builds: y
README is ok: y
RELEASE_NOTES is ok: y
NOTICE is ok: y
LICENSE is ok: y
No unapproved licenses or archives: y
No unapproved binaries: y

Package 
http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs_release_branch/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.8.0-bin.tar.gz
Binary kit signatures match: y
NOTICE is ok: y
LICENSE is ok: y
No unapproved licenses or archives in binary package: y
No unapproved binaries in binary package: y

> On Jun 10, 2017, at 1:00 AM, Alex Harui  wrote:
> 
> Hi,
> 
> This is vote for the 0.8.0 release of Apache FlexJS.
> 
> The release candidate can be found here;
> https://dist.apache.org/repos/dist/dev/flex/flexjs/0.8.0/rc1/
> 
> 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:
> - MD5 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 cross-compile a simple example using the SDK.
> 
> The source package is set up the same way as the repo.  This means that
> the results of the build are not the same as an IDE-compatible SDK.  The
> compiled source package can be used in combination with the FalconJX
> source package to compile some of the sample applications.
> 
> The most convenient way to use the binary package is to install it via Ant
> or the Installer.  To use an Installer you must use InstallApacheFlex
> version 3.1 or later.  You can get InstallApacheFlex here:
> http://www.apache.org/dyn/closer.cgi?path=/flex/installer/3.1/binaries/
> 
> Please vote to approve this release:
> +1 Approve the release
> -1 Veto 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 I 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/flex/flexjs/0.8.0/rc1/ApproveFlexJS.
> xml
> 3) run the script: ant -e -f ApproveFlexJS.xml -Drelease.version=0.8.0
> -Drc=1
> 
> 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,
> Alex Harui
> 



Re: [VOTE] Release Apache Flex FalconJX 0.8.0 RC1

2017-06-11 Thread Harbs
+1
Package 
https://dist.apache.org/repos/dist/dev/flex/falcon/0.8.0/rc1/apache-flex-falconjx-0.8.0-src.tar.gz
Java 1.8
OS: Mac OS X x86_64 10.10.5
Source kit signatures match: y
Source kit builds: y
README is ok: y
README_JX is ok: y
RELEASE_NOTES is ok: y
RELEASE_NOTES_JX is ok: y
NOTICE is ok: y
LICENSE is ok: y
No unapproved licenses or archives in source package: y
No unapproved binaries in source package: y

Package 
https://dist.apache.org/repos/dist/dev/flex/falcon/0.8.0/rc1/binaries/apache-flex-falconjx-0.8.0-bin.tar.gz
Binary kit signatures match: y
NOTICE is ok: y
LICENSE is ok: y
No unapproved licenses or files in jars: y
No unapproved licenses or archives in binary package: y
No unapproved binaries in binary package: y

> On Jun 10, 2017, at 12:59 AM, Alex Harui  wrote:
> 
> Hi,
> 
> This is vote for the 0.8.0 release of the FalconJX (and Falcon)
> compilers.  There is no separate Falcon-only release package at
> this time.  The only purpose of the FalconJX packages are to serve as
> upstream packages for the FlexJS release.
> 
> The release candidate can be found here;
> https://dist.apache.org/repos/dist/dev/flex/falcon/0.8.0/rc1/
> 
> 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:
> - MD5 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 using the results of building the source package
> 
> The source package is set up the same way as the repo.  This means that
> the results of the build are not the same as the binary package.  The
> compiled source package can be used to build FlexJS apps via the command
> line and Ant, but not in Flash Builder or other IDEs.  You can test the
> source
> package by building it, then pointing to it from the source package of the
> FlexJS release candidate and building the examples in the FlexJS package.
> 
> The binary package is set up as an upstream package for the FlexJS
> release.  The most convenient way to use the binary package is to install
> a FlexJS SDK via Ant or the Installer.
> 
> Please vote to approve this release:
> +1 Approve the release
> -1 Veto 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 there
> will be many bugs found.  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.
> 
> Please put all discussion about this release in the DISCUSSION thread not
> this VOTE thread.
> 
> 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/flex/falcon/0.8.0/rc1/ApproveFalcon.
> xml
> 3) run the script: ant -e -f ApproveFalcon.xml -Drelease.version=0.8.0
> -Drc=1
> 
> You are not required to use this script, and more testing of the packages
> and build results are always encouraged.
> 
> Thanks,
> Alex Harui
> 



Re: [DISCUSS] Discuss Release Apache FlexJS 0.8.0 RC1

2017-06-11 Thread Harbs
I did not see anything that would preclude a release, but the readme does not 
have anything that mentions Maven. The prerequisites only mention ANT and 
environment variables.

It would be a good idea that for the next release, we should add installation 
instructions for Maven as well. (and probably npm too).

Harbs

> On Jun 10, 2017, at 10:14 PM, piotrz  wrote:
> 
> Hi Carlos,
> 
> Unfortunately Maven is not the main way of building of FlexJS. 
> 
> - Flex installer still serves Ant build of FlexJS for the user.
> - Maven distribution package of FlexJS has some missing thing and it is not
> usable by IDE - jira has been raised.
> 
> As for the tests: 
> I did all tests as you mention, additionally I run ApproveFalcon.xml script
> which help you check everything and Ant build.
> Copy ApproveFalcon.xml to empty folder and run:
> 
> ant -f ApproveFalcon.xml -Drelease.version=0.8.0
> 
> Piotr
> 
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/DISCUSS-Discuss-Release-Apache-FlexJS-0-8-0-RC1-tp62274p62299.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS] more on undefined / non initialised values

2017-06-11 Thread Harbs
It seems like the general case is better to have the initialization. Thanks for 
implementing that.

It would probably be nice for the compiler to be intelligent and only 
initialize if the code does not initialize too.

So:

var val:Boolean;
// further down before val is actually accessed
val = true;// or val = false;

should not initialize val, but:

var val:Boolean;
// further down 
if(val == someotherval){
// do something
}
should initialize it.

But I don’t see this as critical for now.

Harbs

> On Jun 11, 2017, at 10:56 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> The changes you made look fine.
> 
> Do you want them as the default and an option to turn them off? I’m assuming 
> you will you at some later point add other switches to turn other 
> optimisations (whatever they may be) on?
> 
>> Seems like eventually we'll have to initialize other types as well.
> 
> I’d guestimate there would be a performance boost for string and for object 
> as well / but the size cost may be different. Won't know until I or someone 
> tries it.
> 
>> Safe, but inefficient at times.
> 
> So far I not seen any inefficiency in fact the opposite. But sure there may 
> be specific cases that perform better, please post any you find to the list.
> 
> Thanks,
> Justin



Re: [FlexJS] more on undefined / non initialised values

2017-06-11 Thread Harbs
var start = Date.now();
var val;
for(var i=0;i<100;i++){
val=false;
val=false;
}
console.log(Date.now()-start);

V8 (Node.js and Chrome) seems to optimize this loop out, so you can do a 
billion iterations really fast. Firefox gives a more realistic indication of 
performance:

This takes about 700 ms for a million iterations on my machine. Setting it once 
instead of twice cuts off about 100ms.

Harbs

> On Jun 11, 2017, at 10:56 AM, Justin Mclean  wrote:
> 
>> Safe, but inefficient at times.
> 
> So far I not seen any inefficiency in fact the opposite. But sure there may 
> be specific cases that perform better, please post any you find to the list.



Re: [FlexJS] more on undefined / non initialised values

2017-06-11 Thread Harbs
Justin seems to have observed the Google compiler stripping these out. It seems 
like a good idea to do some research on how extensively it does so. If we can 
rely on goog to do this work for us, then I’m fine with that.

Either way, the performance implications one way or the other are miniscule. I 
see this as a “nice to look into” feature for one day when there’s cycles for 
it, but for now I have plenty of bigger fish to fry. ;-)

We should probably capture this in a JIRA though.

> On Jun 12, 2017, at 7:19 AM, Alex Harui  wrote:
> 
> Yep.  We are introducing "just-in-case" code.  These changes are not PAYG,
> until we get more of these optimizations in.  I'm still interested in how
> many of these cases there are.  Some day I'll find out.  But probably not
> right away.
> 
> -Alex
> 
> On 6/11/17, 1:21 AM, "Harbs"  wrote:
> 
>> It seems like the general case is better to have the initialization.
>> Thanks for implementing that.
>> 
>> It would probably be nice for the compiler to be intelligent and only
>> initialize if the code does not initialize too.
>> 
>> So:
>> 
>> var val:Boolean;
>> // further down before val is actually accessed
>> val = true;// or val = false;
>> 
>> should not initialize val, but:
>> 
>> var val:Boolean;
>> // further down 
>> if(val == someotherval){
>> // do something
>> }
>> should initialize it.
>> 
>> But I don’t see this as critical for now.
>> 
>> Harbs
>> 
>>> On Jun 11, 2017, at 10:56 AM, Justin Mclean 
>>> wrote:
>>> 
>>> Hi,
>>> 
>>>> The changes you made look fine.
>>> 
>>> Do you want them as the default and an option to turn them off? I’m
>>> assuming you will you at some later point add other switches to turn
>>> other optimisations (whatever they may be) on?
>>> 
>>>> Seems like eventually we'll have to initialize other types as well.
>>> 
>>> I’d guestimate there would be a performance boost for string and for
>>> object as well / but the size cost may be different. Won't know until I
>>> or someone tries it.
>>> 
>>>> Safe, but inefficient at times.
>>> 
>>> So far I not seen any inefficiency in fact the opposite. But sure there
>>> may be specific cases that perform better, please post any you find to
>>> the list.
>>> 
>>> Thanks,
>>> Justin
>> 
> 



Re: [DISCUSS] Discuss Release Apache FlexJS 0.8.0 RC1

2017-06-13 Thread Harbs
All Flex project repos are prefixed with flex-

> On Jun 13, 2017, at 9:59 AM, Christofer Dutz  
> wrote:
> 
> By the way … why is this directory called “flex-typedefs” and not 
> “flexjs-typedefs”?
> 
> Chris
> 
> Am 13.06.17, 08:55 schrieb "Christofer Dutz" :
> 
>Hi all,
> 
>Please don’t let this become another license discussion … I thought that 
> had been settled. I intentionally added that this was a technical issue in my 
> report. 
>If the flexjs-typedefs directory is going to be included in the compiler 
> package, the compiler packages pom needs an exclusion for the flexjs-typedefs 
> directory to avoid any problems like this. The content of the flesjs-typedefs 
> directory will be checked by the flexjs-typedefs build so in the end all is 
> checked. I’m just going to do this little tweak myself so if a new release 
> candidate is created, we have this “fix” in place.
> 
>Chris 
> 
>Am 13.06.17, 00:49 schrieb "Dave Fisher" :
> 
>Hi -
> 
>> On Jun 12, 2017, at 12:41 PM, Alex Harui  wrote:
>> 
>> I'm confused.  Can I get a summary?
>> 
>> Are there some files that are being caught by RAT?  If so, what are they?
>> 
>> Are we sure the process should be that the RM should switch away from
>> SNAPSHOT before the vote?  If a major problem is found in that RC,
>> wouldn't we have deployed bad artifacts under the final version number and
>> have to pull them back?  Or abandon that release version and use the next
>> version number?
> 
>The Tomcat project will user version numbers. If a version fails then 
> they advance to the next. They still produce changelings for the version that 
> is not released. You can see the gory details for version 7 here: 
> http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
> 
>Regards,
>Dave
> 
>> 
>> IMO, the main thing folks want from Maven are the JARs which aren't an
>> official ASF release anyway.  Seems like we should vote on a source
>> package, then set any version numbers and have Maven build the final jars
>> from there.  The differences in the source should only be in POMs and
>> other configs right?
>> 
>> What am I missing?
>> -Alex
>> 
>> On 6/12/17, 3:53 AM, "Christofer Dutz"  wrote:
>> 
>>> It should be between the Last call and opening the vote. It is equal to
>>> “cutting the release candidate”.
>>> 
>>> So, the LAST CALL thread is finished and the RM writes that he’s going to
>>> cut a release … AFTER THAT he does these steps and THEN he opens the vote
>>> thread. I never said anything else than that.
>>> 
>>> Chris
>>> 
>>> 
>>> Am 12.06.17, 12:30 schrieb "piotrz" :
>>> 
>>>  Chris,
>>> 
>>>  I'm a bit confused. You have said that I shouldn't do this as part of
>>>  VOTING, LAST CALL:
>>> 
>>>  "No,
>>> 
>>>  The removing the SNAPSHOT, tagging and setting the new version should
>>> be,
>>>  more or less, one step.
>>>  "
>>> 
>>>  Now you are saying just opposite. So again when I should do this
>>> (Last Call,
>>>  Voting) step ?
>>> 
>>>  "1) In order to have a proper Maven release, the versions of the
>>> maven build
>>>  should be changed to “0.8.0” (omit the SNAPSHOT). "
>>> 
>>>  Piotr
>>> 
>>> 
>>> 
>>>  -
>>>  Apache Flex PMC
>>>  piotrzarzyck...@gmail.com
>>>  --
>>>  View this message in context:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>>> x-development.247.n4.nabble.com%2FDISCUSS-Discuss-Release-Apache-FlexJ
>>> S-0-8-0-RC1-tp62274p62341.html&data=02%7C01%7C%7C764b156340ed4161762808d4b
>>> 1813b7a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636328616008847001&sd
>>> ata=pnXSK31V8HvCRI9NlEVlGD0SgCczOCQYlw0PyoVZnfQ%3D&reserved=0
>>>  Sent from the Apache Flex Development mailing list archive at
>>> Nabble.com.
>>> 
>>> 
>> 
> 
> 
> 
> 
> 



Re: [VOTE] Release Apache Flex FalconJX 0.8.0 RC1

2017-06-14 Thread Harbs
/**
 * @param {string} type
 * @param {!EventListener|(function(!Event): (boolean|undefined))| null} 
listener
 * @param {boolean=} opt_useCapture
 */
SVGElementInstance.prototype.addEventListener = function(type, listener, 
opt_useCapture){};


/**
 * @param {string} type
 * @param {!EventListener|(function(!Event): (boolean|undefined))| null} 
listener
 * @param {boolean=} opt_useCapture

function(!Event) has now become function(Event)

I assume this is from the patch. Other than that, it’s identical.

> On Jun 14, 2017, at 5:23 AM, Justin Mclean  > wrote:
> 
> Can some mind doing a diff with their version of the file and the version 
> here [1]?



Re: [VOTE] Release Apache Flex FalconJX 0.8.0 RC1

2017-06-14 Thread Harbs
Quite frankly, I don’t know how to read patch files, and I don’t know what it’s 
supposed to be doing.

I’m going to leave this to someone who understands this better than I do to 
figure out… ;-)

> On Jun 14, 2017, at 12:12 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> I assume this is from the patch.
> 
> Yep that’s in the patch.
> /**
> * @param {string} type
> - * @param {!EventListener|(function(Event): (boolean|undefined))| null} 
> listener
> + * @param {!EventListener|(function(!Event): (boolean|undefined))| null} 
> listener
> * @param {boolean=} opt_useCapture
> */
> SVGElementInstance.prototype.addEventListener = function(type, listener, 
> opt_useCapture){};
> 
> But if that line was already changed wouldn’t the patch fail?
> 
>> Other than that, it’s identical.
> 
> Which would be odd as the patch removes 100+ lines, all comments I believe. 
> Did you see that?
> 
> thanks,
> Justin



Re: [5/8] git commit: [flex-asjs] [refs/heads/tlf] - remove buttonDown from JS. It is supposedly unreliable on JS. Folks will have to track mouseDown and mouseUp

2017-06-18 Thread Harbs
I beg to differ.

Yes. The HTML one is always false for mouse move events, but I do think the 
Flex MouseEvent should have a buttonDown property. (Actually, it should 
probably have a property for info on which button is pressed.) The state 
tracking should be passed along with the event.

> On Jun 17, 2017, at 8:08 AM, aha...@apache.org wrote:
> 
> remove buttonDown from JS.  It is supposedly unreliable on JS.  Folks will 
> have to track mouseDown and mouseUp
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1677f0a9
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1677f0a9
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1677f0a9
> 
> Branch: refs/heads/tlf
> Commit: 1677f0a9a6a5474faaba5b2996178866faa69417
> Parents: 3b88454
> Author: Alex Harui 
> Authored: Fri Jun 16 21:01:25 2017 -0700
> Committer: Alex Harui 
> Committed: Fri Jun 16 22:08:44 2017 -0700
> 
> --
> .../Core/src/main/flex/org/apache/flex/events/MouseEvent.as| 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
> --
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1677f0a9/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> --
> diff --git 
> a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as 
> b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> index 1cea36d..c2fe391 100644
> --- 
> a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> +++ 
> b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> @@ -247,7 +247,6 @@ package org.apache.flex.events
>   this.ctrlKey = ctrlKey;
>   this.altKey = altKey;
>   this.shiftKey = shiftKey;
> - this.buttonDown = buttonDown;
>   this.delta = delta;
>   this.commandKey = commandKey;
>   this.controlKey = controlKey;
> @@ -280,7 +279,10 @@ package org.apache.flex.events
>   public var ctrlKey:Boolean;
>   public var altKey:Boolean;
>   public var shiftKey:Boolean;
> - public var buttonDown:Boolean;
> +// MDL says buttonDown is unreliable in JS for mouseMove so hide
> +// the API so folks get compile errors and keep their own flags
> +// for mouseDown/mouseUp
> + private var buttonDown:Boolean;
>   public var delta:int;
>   public var commandKey:Boolean;
>   public var controlKey:Boolean;
> 



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-18 Thread Harbs
Yes.

But I’m not sure it currently makes sense to create a Maven branch.

I don’t think I’m merging it in any time soon and I’m perfectly happy building 
with ant. I’m not going to spend time fixing Maven builds if they break on the 
branch, so I’m not sure there’s any benefit in doing so.

That said; if you want to create the maven build, I will not stand in your way.

Harbs

> On Jun 18, 2017, at 1:27 PM, piotrz  wrote:
> 
> Hi Harbs,
> 
> I noticed that TLF branch do not have proper Maven build on jenkins. I would
> like to create one for you. In order to do this I need to create branch
> named tlf in typedefs and falcon repo. 
> 
> As I understand your branch was created from develop and release branch is
> merged there ?
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-18 Thread Harbs
Does develop have all the changes in the release branch?

Make sure you don’t revert any changes there…

> On Jun 18, 2017, at 2:49 PM, piotrz  wrote:
> 
> Harbs,
> 
> Creating this means that I will have to update your tlf branch with
> 0.9.0-SNAPSHOT. ("develop") I hope it is ok for you.
> 
> Let me know.
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62457.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-18 Thread Harbs
Yes. it was merged not too long ago.

Sounds good.

> On Jun 18, 2017, at 3:04 PM, piotrz  wrote:
> 
> I did following things:
> 
> Merge develop to tlf - conflicts only in poms - as expected.
> Merge release branch to tlf - conflicts in poms. Changes are in UIBase
> related to Justin's findings != to !== etc. 
> 
> Your branch was pretty fresh as I see.
> 
> I think I didn't revert anything doing that. 
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62459.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-18 Thread Harbs
> There is possibility that some dependencies are missing, but not sure what
> Text module need in order to build. I add only Core and Binding.

It needs Core, Basic and HTML.

> On Jun 18, 2017, at 4:28 PM, piotrz  wrote:
> 
> Here you go your private tlf pipeline on Jenkins :) [1]. Compiler and typdefs
> are building ok, but FlexJS failed cause rat complains about some
> un-approved files license.
> 
> I did also ceate for tests pom for Text module [2] and build failed with
> lots of errors. If you do not experience any errors building by Ant that's
> not good. Maybe Maven is a bit more restrict about some things. You need to
> try on your own. Copy pom [2] to Text folder and run mvn clean install -
> There is possibility that some dependencies are missing, but not sure what
> Text module need in order to build. I add only Core and Binding.
> 
> [1]
> https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Pipeline/job/tlf/
> [2] https://paste.apache.org/8T2e
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62461.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-18 Thread Harbs
Nice.

I’ll try not to break this… ;-)

> On Jun 18, 2017, at 10:33 PM, piotrz  wrote:
> 
> Wow :) After 4 shots it is finally blue [1] :)  
> 
> 
> [1]
> https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Pipeline/job/tlf/4/
> 
> Piotr
> 
> 
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62468.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Added callLater

2017-06-18 Thread Harbs
Right. (I copied most of the code from there.) But that can only be called from 
a strand. I wanted a stand alone function that can be called from anywhere. I 
needed to call a method that breaks out of recursion in a non-strand class.

> On Jun 19, 2017, at 7:39 AM, Alex Harui  wrote:
> 
> FWIW, There is already a CallLaterBead.
> 
> -Alex
> 
> On 6/18/17, 3:34 AM, "ha...@apache.org"  wrote:
> 
>> Repository: flex-asjs
>> Updated Branches:
>> refs/heads/tlf 914e666c7 -> 06f47590c
>> 
>> 
>> Added callLater
>> 
>> 
>> Project: 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7Ce86106f11f6
>> 840ac975108d4b635a3ea%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363337
>> 88909731382&sdata=QtzIK5XvaBgmhXtWEayKFxrhIW3lDfqqdZCTV%2BpU%2B6w%3D&reser
>> ved=0
>> Commit: 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F06f47590&data=02%7C01%7C%
>> 7Ce86106f11f6840ac975108d4b635a3ea%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> 7C0%7C636333788909741387&sdata=%2Bkuk1%2Fdy3bm0yPOnC%2BRtEpj5vMxis7sx%2B2T
>> NOLktpr0%3D&reserved=0
>> Tree: 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F06f47590&data=02%7C01%7C%7C
>> e86106f11f6840ac975108d4b635a3ea%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>> 0%7C636333788909741387&sdata=HOYnpt8VUo8XW640CBNCAsVs7wFVMPTFiiyrkl%2BFzgg
>> %3D&reserved=0
>> Diff: 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F06f47590&data=02%7C01%7C%7C
>> e86106f11f6840ac975108d4b635a3ea%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>> 0%7C636333788909741387&sdata=I1hVoA9HSTJtSLQOAJ2RYWJMC5x50cSfKM8bwYULW4w%3
>> D&reserved=0
>> 
>> Branch: refs/heads/tlf
>> Commit: 06f47590cc13434f10f2612d64640bd872ff86bc
>> Parents: 914e666
>> Author: Added floor to binary search 
>> Authored: Sun Jun 18 13:34:41 2017 +0300
>> Committer: Added floor to binary search 
>> Committed: Sun Jun 18 13:34:41 2017 +0300
>> 
>> --
>> .../projects/Core/src/main/flex/CoreClasses.as  |  1 +
>> .../flex/org/apache/flex/utils/callLater.as | 42 
>> 2 files changed, 43 insertions(+)
>> --
>> 
>> 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F06f47590%2Fframeworks%2Fpro
>> jects%2FCore%2Fsrc%2Fmain%2Fflex%2FCoreClasses.as&data=02%7C01%7C%7Ce86106
>> f11f6840ac975108d4b635a3ea%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63
>> 6333788909741387&sdata=OXW0E%2BdzkJty8HFtuYLQmgJi6wsyRMUjrAY3wuV3bHk%3D&re
>> served=0
>> --
>> diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as
>> b/frameworks/projects/Core/src/main/flex/CoreClasses.as
>> index 8578903..0aaa985 100644
>> --- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
>> +++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
>> @@ -163,6 +163,7 @@ internal class CoreClasses
>>  import org.apache.flex.utils.HTMLLoader; HTMLLoader;
>>  }
>>  import org.apache.flex.utils.BrowserUtils; BrowserUtils;
>> +import org.apache.flex.utils.callLater; callLater;
>>import org.apache.flex.utils.CompressionUtils; CompressionUtils;
>>  import org.apache.flex.utils.Endian; Endian;
>>  import org.apache.flex.utils.JXON; JXON;
>> 
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F06f47590%2Fframeworks%2Fpro
>> jects%2FCore%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Futils%2FcallLater
>> .as&data=02%7C01%7C%7Ce86106f11f6840ac975108d4b635a3ea%7Cfa7b1b5a7b3443879
>> 4aed2c178decee1%7C0%7C0%7C636333788909741387&sdata=96YUaiTeiZLHQOF1%2FmUUQ
>> zvnsn9I%2BxNuIO4xBgeGBPw%3D&reserved=0
>> --
>> diff --git 
>> a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/callLater.a
>> s 
>> b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/callLater.a
>> s
>> new file mode 100644
>> index 000..23af5fe
>> --- /dev/null
>> +++ 
>> b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/callLater.a
>> s
>> @@ -0,0 +1,42 @@
>> +/
>> ///
>> +//
>> +//  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 "License"); you may not use

Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and !== where needed

2017-06-21 Thread Harbs
This commit broke UIBase.

I’m reverting a lot of these strict equalities.

> On Jun 3, 2017, at 4:43 AM, jmcl...@apache.org wrote:
> 
> use === and !== where needed
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4eb2f8b1
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4eb2f8b1
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4eb2f8b1
> 
> Branch: refs/heads/develop
> Commit: 4eb2f8b168e4857b33163a36d8e98b56550fc39c
> Parents: 282125c
> Author: Justin Mclean 
> Authored: Fri Jun 2 19:48:19 2017 +1000
> Committer: Justin Mclean 
> Committed: Fri Jun 2 19:48:19 2017 +1000
> 
> --
> .../main/flex/org/apache/flex/core/UIBase.as| 80 ++--
> 1 file changed, 40 insertions(+), 40 deletions(-)
> --
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4eb2f8b1/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
> --
> diff --git 
> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as 
> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
> index 04615c3..e242fd6 100644
> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
> @@ -202,7 +202,7 @@ package org.apache.flex.core
>  */
> public function set explicitWidth(value:Number):void
>   {
> - if (_explicitWidth == value)
> + if (_explicitWidth === value)
>   return;
>   
>   // width can be pixel or percent not both
> @@ -235,7 +235,7 @@ package org.apache.flex.core
>  */
>   public function set explicitHeight(value:Number):void
>   {
> - if (_explicitHeight == value)
> + if (_explicitHeight === value)
>   return;
>   
>   // height can be pixel or percent not both
> @@ -272,7 +272,7 @@ package org.apache.flex.core
>   public function set percentWidth(value:Number):void
>   {
>   COMPILE::SWF {
> - if (_percentWidth == value)
> + if (_percentWidth === value)
>   return;
>   
>   if (!isNaN(value))
> @@ -315,7 +315,7 @@ package org.apache.flex.core
>   public function set percentHeight(value:Number):void
>   {
>   COMPILE::SWF {
> - if (_percentHeight == value)
> + if (_percentHeight === value)
>   return;
>   
>   if (!isNaN(value))
> @@ -369,7 +369,7 @@ package org.apache.flex.core
> {
> var pixels:Number;
> var strpixels:String = positioner.style.width as String;
> -if (strpixels !== null && strpixels.indexOf('%') != -1)
> +if (strpixels !== null && strpixels.indexOf('%') !== -1)
> pixels = NaN;
> else
> pixels = parseFloat(strpixels);
> @@ -389,7 +389,7 @@ package org.apache.flex.core
> COMPILE::SWF
>   override public function set width(value:Number):void
>   {
> - if (explicitWidth != value)
> + if (explicitWidth !== value)
>   {
>   explicitWidth = value;
>   }
> @@ -403,7 +403,7 @@ package org.apache.flex.core
> COMPILE::JS
> public function set width(value:Number):void
> {
> -if (explicitWidth != value)
> +if (explicitWidth !== value)
> {
> explicitWidth = value;
> }
> @@ -461,7 +461,7 @@ package org.apache.flex.core
> {
> var pixels:Number;
> var strpixels:String = positioner.style.height as String;
> -if (strpixels !== null && strpixels.indexOf('%') != -1)
> +if (strpixels !== null && strpixels.indexOf('%') !== -1)
> pixels = NaN;
> else
> pixels = parseFloat(strpixels);
> @@ -481,7 +481,7 @@ package org.apache.flex.core
> COMPILE::SWF
>   override public function set height(value:Number):void
>   {
> - if (explicitHeight != value)
> + if (explicitHeight !== value)
>   {
> 

Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-21 Thread Harbs
It broke when element was undefined.

Looking at the code there were plenty of other places where values could have 
been undefined.

There’s no reason to use strict equality so rampantly. (The performance gains 
are insignificant.)

> On Jun 21, 2017, at 6:48 PM, Piotr Zarzycki  wrote:
> 
> Hi Harbs,
> 
> What was wrong with that ?
> 
> Thanks, Piotr
> 
> 2017-06-21 17:42 GMT+02:00 :
> 
>> Repository: flex-asjs
>> Updated Branches:
>>  refs/heads/tlf c40993826 -> 3d2190621
>> 
>> 
>> Reverted strict equality
>> 
>> 
>> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3d219062
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3d219062
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3d219062
>> 
>> Branch: refs/heads/tlf
>> Commit: 3d2190621d3900dfa40f9480eb2aa4370b8fd847
>> Parents: c409938
>> Author: Harbs 
>> Authored: Wed Jun 21 18:42:31 2017 +0300
>> Committer: Harbs 
>> Committed: Wed Jun 21 18:42:31 2017 +0300
>> 
>> --
>> .../main/flex/org/apache/flex/core/UIBase.as| 40 ++--
>> 1 file changed, 20 insertions(+), 20 deletions(-)
>> --
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/
>> 3d219062/frameworks/projects/Basic/src/main/flex/org/
>> apache/flex/core/UIBase.as
>> --
>> diff --git 
>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
>> index 432c8d2..8d08465 100644
>> --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/
>> core/UIBase.as
>> +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/
>> core/UIBase.as
>> @@ -202,7 +202,7 @@ package org.apache.flex.core
>>  */
>> public function set explicitWidth(value:Number):void
>>{
>> -   if (_explicitWidth === value)
>> +   if (_explicitWidth == value)
>>return;
>> 
>>// width can be pixel or percent not both
>> @@ -235,7 +235,7 @@ package org.apache.flex.core
>>  */
>>public function set explicitHeight(value:Number):void
>>{
>> -   if (_explicitHeight === value)
>> +   if (_explicitHeight == value)
>>return;
>> 
>>// height can be pixel or percent not both
>> @@ -272,7 +272,7 @@ package org.apache.flex.core
>>public function set percentWidth(value:Number):void
>>{
>>COMPILE::SWF {
>> -   if (_percentWidth === value)
>> +   if (_percentWidth == value)
>>return;
>> 
>>if (!isNaN(value))
>> @@ -315,7 +315,7 @@ package org.apache.flex.core
>>public function set percentHeight(value:Number):void
>>{
>>COMPILE::SWF {
>> -   if (_percentHeight === value)
>> +   if (_percentHeight == value)
>>return;
>> 
>>if (!isNaN(value))
>> @@ -369,7 +369,7 @@ package org.apache.flex.core
>> {
>> var pixels:Number;
>> var strpixels:String = positioner.style.width as String;
>> -if (strpixels !== null && strpixels.indexOf('%') !== -1)
>> +if (strpixels !== null && strpixels.indexOf('%') != -1)
>> pixels = NaN;
>> else if (strpixels === "")
>>pixels = NaN;
>> @@ -377,7 +377,7 @@ package org.apache.flex.core
>> pixels = parseFloat(strpixels);
>> if (isNaN(pixels)) {
>> pixels = positioner.offsetWidth;
>> -if (pixels === 0 && positioner.scrollWidth !== 0) {
>> +if (pixels == 0 && positioner.scrollWidth != 0) {
>> // invisible child elements cause offs

Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and !== where needed

2017-06-21 Thread Harbs
new UIBase() simply no longer worked…

> On Jun 21, 2017, at 6:34 PM, piotrz  wrote:
> 
> Actually it would be good if you could point some UI scenario where it breaks
> something if it is possible.
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-3-7-git-commit-flex-asjs-refs-heads-develop-use-and-where-needed-tp62525p62528.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-21 Thread Harbs
Yes. Go ahead.

I think this missed the 0.8.0 release though.

> On Jun 21, 2017, at 7:01 PM, piotrz  wrote:
> 
> Harbs,
> 
> If it is breaking in a simple cases, can we propagate this changes to
> develop ? I don't wanna chase issue in a real world application cause of
> that.
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-Reverted-strict-equality-tp62526p62532.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-21 Thread Harbs
I’m not going to invest a lot more time into this.

You willy-nilly changed equality to strict equality. That cost me time and 
money. I vetoed your change. Period.

Changing all equality to strict equality is (IMO) pedantic. In most cases the 
two operators are functionally equivalent. In some cases strict equality is 
necessary. In some cases equality is necessary.

Performance gains are NOT significant. Performance gains by using strict 
equality is in microseconds (at most). They are not measurable in real 
applications. If you end up doing a type conversion to use the strict equality, 
all performance gains are lost. This topic has been discussed to death on other 
places on the web. Strict equality comes at a cost of an extra byte in the 
download. In my book, that’s a wash.

If I broke something by reverting your changes, feel free to fix it again, but 
I will veto any change to use strict equality against null unless there is a 
very strong argument to do so in a specific case.

Thanks,
Harbs

> On Jun 22, 2017, at 2:03 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> It broke when element was undefined.
> 
> So why not only change / revert that?
> 
>> There’s no reason to use strict equality so rampantly. (The performance 
>> gains are insignificant.)
> 
> As has previously been discussed on develop the performance gains are 
> significant.
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-21 Thread Harbs
Another point:

The main argument for using strict equality is because it does type conversions 
which can cause bugs. Since we are using a strongly typed language, type safety 
is generally enforced by the compiler, so most of those bugs are not relevant 
to us. Therefore the class of bugs that come from using strict equality is 
probably worse and we should prefer regular equality.

> On Jun 22, 2017, at 9:45 AM, Harbs  wrote:
> 
> I’m not going to invest a lot more time into this.
> 
> You willy-nilly changed equality to strict equality. That cost me time and 
> money. I vetoed your change. Period.
> 
> Changing all equality to strict equality is (IMO) pedantic. In most cases the 
> two operators are functionally equivalent. In some cases strict equality is 
> necessary. In some cases equality is necessary.
> 
> Performance gains are NOT significant. Performance gains by using strict 
> equality is in microseconds (at most). They are not measurable in real 
> applications. If you end up doing a type conversion to use the strict 
> equality, all performance gains are lost. This topic has been discussed to 
> death on other places on the web. Strict equality comes at a cost of an extra 
> byte in the download. In my book, that’s a wash.
> 
> If I broke something by reverting your changes, feel free to fix it again, 
> but I will veto any change to use strict equality against null unless there 
> is a very strong argument to do so in a specific case.
> 
> Thanks,
> Harbs
> 
>> On Jun 22, 2017, at 2:03 AM, Justin Mclean  wrote:
>> 
>> Hi,
>> 
>>> It broke when element was undefined.
>> 
>> So why not only change / revert that?
>> 
>>> There’s no reason to use strict equality so rampantly. (The performance 
>>> gains are insignificant.)
>> 
>> As has previously been discussed on develop the performance gains are 
>> significant.
>> 
>> Thanks,
>> Justin
> 



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
I just looked at the code and I see at least one possible bug. Assigning the 
source to undefined will fail.

> On Jun 22, 2017, at 9:44 AM, piotrz  wrote:
> 
> Hi Harbs,
> 
> That's a strong point to your changes. Compiler protect us. I'm wondering
> there were also changes in ArrayList - Do you experience with that area some
> problems ?
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-Reverted-strict-equality-tp62526p62549.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs

> On Jun 22, 2017, at 10:07 AM, Justin Mclean  wrote:

> I got performance gains of 30-40%. 

Of what? Percentages when dealing with such cheap operators are generally 
meaningless.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs

> On Jun 22, 2017, at 10:14 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> The main argument for using strict equality is because it does type 
>> conversions which can cause bugs.
> 
> Incorrect strict equality doesn’t do type conversion, but I assume you meant 
> to say "it doesn’t do type conversion”.

By “it” I meant regular equality.


>> Since we are using a strongly typed language, type safety is generally 
>> enforced by the compiler
> 
> Expect were we’re comparing with undefined which we are currently doing for 
> just about every Object, String and Number in the SDK on the JS side.

Exactly. And all those should NOT use strict equality.

Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
Again; this means nothing to me. What is your app doing and how much CPU time 
was spent?

> On Jun 22, 2017, at 10:33 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>>> I got performance gains of 30-40%. 
>> 
>> Of what? Percentages when dealing with such cheap operators are generally 
>> meaningless.
> 
> Of total CPU time spent on application for a few minutes. Measured using the 
> Chrome profiler.
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs

> On Jun 22, 2017, at 10:07 AM, Justin Mclean  wrote:
> 
> or do your own tests

No need:

https://jsperf.com/triple-equals-vs-twice-equals 

https://jsperf.com/triple-equals-vs-double-equals/3 


If there’s no type conversion, the difference between the two operators are 
negligible.

If there is a type conversion, well then it really depends on whether you need 
it...

Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
Your link is actually arguing for use for non-strict equality…

But again: Some places you need == and some places you need ===. Bugs can be 
introduced both ways.

This is getting tiring, and I have work to do.

> On Jun 22, 2017, at 10:38 AM, Justin Mclean  wrote:
> 
> HI,
> 
> Point 1 may explain the issue clearer [1] there are situation we’re use of == 
> and != is going to cause bugs.
> 
> Thanks,
> Justin
> 
> 1. 
> https://herringtondarkholme.github.io/2016/11/05/how-to-write-copy-paste-friendly-code/
>  
> 



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
And the only thing you changed was strict equality? I find that VERY hard to 
believe.

I see you made lots of other changes. For example, I see you removed a 
try/catch in SimpleCSSValuesImpl. That seems like a much more likely culprit 
for performance improvement.

> On Jun 22, 2017, at 10:43 AM, Justin Mclean  wrote:
> 
> Initial cpu time was of the order of 480ms from memory so 30-40% is a 
> significant improvement on that and noticeable by the user.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
+1.

If we have a sample app, we can analyze where performance problems might be and 
make an educated decision based on that.

I am making more reverts (and optimizations) in the TLF branch. If there proves 
to be a compelling reason to use strict equality I will be happy to audit my 
code.

> On Jun 22, 2017, at 11:11 AM, piotrz  wrote:
> 
> I think if changes in UIBase making app unusable and cause crash +1 for
> reverting it. - Performance is on the second place.
> 
> I'm willing to put Harb's changes in develop, but
> 
> Justin,
> 
> Could you create simple app and raise jira which shows this performance
> issue? 
> 
> Since we did talk about raising jiras for issue let's got in that way till
> then let's revert.
> 
> What do you think ?
> 
> Piotr
> 
> 
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-Reverted-strict-equality-tp62526p62563.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-22 Thread Harbs
The changes are quite extensive, but I’ll break it up into a lot of smaller 
commits.

> On Jun 22, 2017, at 12:04 PM, piotrz  wrote:
> 
> Harbs,
> 
> Make sure that those changes are simply, cause I will do cherry pick up.
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-Reverted-strict-equality-tp62526p62565.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



[FlexJS] getElementIndex()

2017-06-22 Thread Harbs
Is there a reason we are using the underlying node lists for our collection of 
elements?

I would think that it would be more performant (at the possible cost of some 
extra memory) to keep a list of FlexJS elements.

childNodes are live collections which need to constantly be resolved so they 
should not be very performant. They also contain text nodes, so I’m not sure 
that the index will always be correct.

Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-24 Thread Harbs
Thanks.

Assuming the numbers are really indicative, you’ve just shown it to be no 
significant increase in performance. It’s also quite possible that the browser 
is optimizing some of the checks away.

There’s no way that a performance difference of less than a microsecond (one 
way or the other) (not initializing values seemed to have better performance in 
some browser) will have a real world impact. 

You made claims of much more significant improvements in a real app. If you 
have something that might back that up, I’d be interested in seeing...


> On Jun 24, 2017, at 5:45 AM, Justin Mclean  wrote:
> 
> I’ve also raised a JIRA re performance here. [2]
> 2. https://issues.apache.org/jira/browse/FLEX-35330 
> 


Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-24 Thread Harbs
Not unless you can demonstrate there’s a good reason to do so. I have yet to 
see that.

> On Jun 24, 2017, at 5:45 AM, Justin Mclean  wrote:
> 
> Are you OK for Objects and Strings to default to null as well?



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-24 Thread Harbs
I have never seen real world ActionScript code which uses strict equality for 
null.

The argument to use strict equality “because of modern js advice” is not a 
reason to use it in ActionScript. The whole argument is to avoid unexpected 
type conversions. If you are dealing with typed variables, that is generally 
not an issue.

Justin raised a valid argument to initialize Booleans and Numbers. It should 
not be taken any further than that.

Harbs

> On Jun 24, 2017, at 8:04 PM, Josh Tynjala  wrote:
> 
> I'm +1 on changing to null by default on objects and strings. I know this
> will improve compatibility with real world ActionScript code that expects
> null. We can include these in the compiler option to default back to
> undefined, for anyone that prefers that behavior.
> 
> - Josh
> 
> On Jun 23, 2017 7:45 PM, "Justin Mclean"  wrote:
> 
>> Hi,
>> 
>>> Your link is actually arguing for use for non-strict equality…
>> 
>> I suggest you read the content at the link again [1] perhaps you missed
>> the humour there.
>> 
>> So given you don’t want to use strict equality and inequality how do you
>> want to handle this? Does everyone agree with that not using them despite
>> just about all modern JS advice is to use them?
>> 
>> There is as alternative that will fix a lot of the performance issues (but
>> not all) and that is to default Boolean, Numbers, Object and Strings to a
>> sensible default rather than undefined. I’ve already done the work for
>> Boolean and Numbers as not initialising these can causes other bugs. Are
>> you OK for Objects and Strings to default to null as well?
>> 
>> Re concerns re increased size it seem the closure compiler handles this
>> well and there is little or no size difference in the optimised JS
>> produced. I’ve so far found it to be smaller by a fraction of a %.
>> 
>> I’ve also raised a JIRA re performance here. [2]
>> 
>> Thanks,
>> Justin
>> 
>> 1. https://herringtondarkholme.github.io/2016/11/05/how-to-
>> write-copy-paste-friendly-code/
>> 2. https://issues.apache.org/jira/browse/FLEX-35330



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-24 Thread Harbs
Here’s a possible counter-argument to what I just wrote:

undefined can be a functional change to ActionScript code when adding to 
numbers and strings:

var obj:Foo;
trace(1 + undefined); NaN
trace("hello " + undefined); //hello undefined
trace(1 + obj); //1
trace("hello " + obj); //hello null
trace(1 + null); //1
trace("hello " + null); //hello null


However, I'm actually not sure that initializing Numbers is necessary. Leaving 
it as undefined is generally functionally equivalent to NaN:

isNaN(undefined) //true
isNaN(null) //false

But initializing ints to null will generally get the same result as 
initializing them to 0…


> On Jun 24, 2017, at 10:35 PM, Harbs  wrote:
> 
> I have never seen real world ActionScript code which uses strict equality for 
> null.
> 
> The argument to use strict equality “because of modern js advice” is not a 
> reason to use it in ActionScript. The whole argument is to avoid unexpected 
> type conversions. If you are dealing with typed variables, that is generally 
> not an issue.
> 
> Justin raised a valid argument to initialize Booleans and Numbers. It should 
> not be taken any further than that.
> 
> Harbs
> 
>> On Jun 24, 2017, at 8:04 PM, Josh Tynjala  wrote:
>> 
>> I'm +1 on changing to null by default on objects and strings. I know this
>> will improve compatibility with real world ActionScript code that expects
>> null. We can include these in the compiler option to default back to
>> undefined, for anyone that prefers that behavior.
>> 
>> - Josh
>> 
>> On Jun 23, 2017 7:45 PM, "Justin Mclean"  wrote:
>> 
>>> Hi,
>>> 
>>>> Your link is actually arguing for use for non-strict equality…
>>> 
>>> I suggest you read the content at the link again [1] perhaps you missed
>>> the humour there.
>>> 
>>> So given you don’t want to use strict equality and inequality how do you
>>> want to handle this? Does everyone agree with that not using them despite
>>> just about all modern JS advice is to use them?
>>> 
>>> There is as alternative that will fix a lot of the performance issues (but
>>> not all) and that is to default Boolean, Numbers, Object and Strings to a
>>> sensible default rather than undefined. I’ve already done the work for
>>> Boolean and Numbers as not initialising these can causes other bugs. Are
>>> you OK for Objects and Strings to default to null as well?
>>> 
>>> Re concerns re increased size it seem the closure compiler handles this
>>> well and there is little or no size difference in the optimised JS
>>> produced. I’ve so far found it to be smaller by a fraction of a %.
>>> 
>>> I’ve also raised a JIRA re performance here. [2]
>>> 
>>> Thanks,
>>> Justin
>>> 
>>> 1. https://herringtondarkholme.github.io/2016/11/05/how-to-
>>> write-copy-paste-friendly-code/
>>> 2. https://issues.apache.org/jira/browse/FLEX-35330
> 



Re: flex-asjs git commit: DisableBead should not access the strand until it’s added

2017-06-25 Thread Harbs
Sure.

The bug was that specifying the initial disabled value in MXML caused a runtime 
error:
http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/99864a8c
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/99864a8c
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/99864a8c
>> 
>> Branch: refs/heads/tlf
>> Commit: 99864a8cd3605a5030adbec67083f7de7865462b
>> Parents: 26b15e5
>> Author: Harbs 
>> Authored: Sun Jun 25 12:36:47 2017 +0300
>> Committer: Harbs 
>> Committed: Sun Jun 25 12:36:47 2017 +0300
>> 
>> --
>> .../Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as  | 2 ++
>> 1 file changed, 2 insertions(+)
>> --
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/99864a8c/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as
>> --
>> diff --git 
>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as
>>  
>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as
>> index 1d17477..2f8da88 100644
>> --- 
>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as
>> +++ 
>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DisableBead.as
>> @@ -106,6 +106,8 @@ package org.apache.flex.html.beads
>> 
>>  private function updateHost():void
>>  {
>> +if(!_strand)//bail out
>> +return;
>>  COMPILE::SWF {
>>  var interactiveObject:InteractiveObject = 
>> _strand as InteractiveObject;
>>  interactiveObject.mouseEnabled = !disabled;
>> 
> 



Re: flex-asjs git commit: DisableBead should not access the strand until it’s added

2017-06-25 Thread Harbs
I’m actually thinking of merging TLF back sometime over the next few weeks.

I’m at the point where TLF is working pretty well…

If there’s specific commits that someone wants before then, I’ll be happy to 
help with cherry picking.

> On Jun 25, 2017, at 3:14 PM, piotrz  wrote:
> 
> Harbs,
> 
> Your TLF branch will not be soon merged, can you more important fixes from
> time to time make also to develop ? 
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-flex-asjs-git-commit-DisableBead-should-not-access-the-strand-until-it-s-added-tp62602p62604.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
>  I actually think this parity is more important than any performance 
> improvements.
I agree with that. Although, I have two minds on this. I wrote my 
counter-argument to my own arguments after this email (which was making the 
same point you are making). However, after thinking about this some more, I’m 
not sure that the SWF behavior is actually desirable. Adding an uninitiated 
object to a Number is probably symptomatic of a bug. Getting a result of NaN is 
probably better than the null object resolving to 0.

Whether or not to initialize objects as null is a point of controversy in the 
Javascript community:
https://basarat.gitbooks.io/typescript/docs/tips/null.html 
<https://basarat.gitbooks.io/typescript/docs/tips/null.html>

The performance argument is a non-starter. If you look at the results on the 
ticket, some browsers perform better on undefined and non-strict equality, but 
browser performance is a moving target and micro-optimizing against that one 
way or another is a waste of time. Neither strict equality (on objects of the 
same type) or initializing objects is INHERENTLY more efficient. In fact, it’s 
quite possible that undefined is inherently more efficient than null (being 
that a more basic JS type — but I’m not sure about that).

I’m fine discussing the pros and cons of initializing values and strict 
equality, but let’s please keep performance out of the discussion because it 
only creates noise. The only thing that I’m fighting is the noise.

Personally, my current thinking that not initializing values and using 
non-strict equality is the better way to go with Framework code. I have no 
issues making initialization an option for the compiler. My personal preference 
would be to have two options:

1. A preference to initialize booleans and this should be on by default.
2. A separate preference to initialize all other types (with the possible 
exception of ints which should go into the same bucket as booleans) which 
should be off by default.

If most folks want to use strict equality in Framework code and initialize 
objects, I will not put up a fuss.

Thanks,
Harbs

> On Jun 25, 2017, at 7:39 PM, Josh Tynjala  wrote:
> 
> I should make clear that even though I said "at the very least", which
> might sounds like it's minor, I actually think this parity is more
> important than any performance improvements.
> 
> - Josh
> 
> On Jun 25, 2017 9:36 AM, "Josh Tynjala"  wrote:
> 
>> I have yet to hear a good reason not to default to null either. Why are
>> you fighting this so hard? All of your arguments that I can recall seem to
>> be that Justin's performance claims aren't as big as he says. Is there more
>> that I missed? Because if it's little more than that, then, at the very
>> least, it's good to improve parity between JS and SWF.
>> 
>> - Josh
>> 
>> 
>> On Jun 24, 2017 11:45 AM, "Harbs"  wrote:
>> 
>> Not unless you can demonstrate there’s a good reason to do so. I have yet
>> to see that.
>> 
>>> On Jun 24, 2017, at 5:45 AM, Justin Mclean 
>> wrote:
>>> 
>>> Are you OK for Objects and Strings to default to null as well?
>> 
>> 
>> 



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
For kicks I just checked my minified code of my app for equality and inequality 
checks and there were 5466 instances. Just adding strict equality would add 3KB 
to my file size. (out of 1.8 MB, but still...)

It would be an interesting exercise to see much much adding null initialization 
would add to file size. I would guess that it would be significant.

> On Jun 25, 2017, at 7:36 PM, Josh Tynjala  wrote:
> 
> I have yet to hear a good reason not to default to null either.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
Yup.

If we add the option to the compiler, we can do some tests with and without 
initialization. Strict equality would be a little harder but that should be 
doable as well. (A temporary find and replace should work even though it might 
break code. It’ll at least give an idea on the impact to code size.)

Harbs

> On Jun 25, 2017, at 10:15 PM, Josh Tynjala  wrote:
> 
> I'd also be curious to see size comparisons using gzip too, which is pretty
> standard in the JS world.
> 
> - Josh
> 
> On Jun 25, 2017 10:57 AM, "Harbs"  wrote:
> 
> For kicks I just checked my minified code of my app for equality and
> inequality checks and there were 5466 instances. Just adding strict
> equality would add 3KB to my file size. (out of 1.8 MB, but still...)
> 
> It would be an interesting exercise to see much much adding null
> initialization would add to file size. I would guess that it would be
> significant.
> 
>> On Jun 25, 2017, at 7:36 PM, Josh Tynjala  wrote:
>> 
>> I have yet to hear a good reason not to default to null either.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
Interesting factoid:

My original Flash Flex app was 1.5 MB plus a 395 KB module.

The ported Javascript version is 1.8 MB before gzipping plus maybe 100KB of 
images. The main app after gzipping is 494KB. That’s including all the 
framework code and TLF.

So even after figuring in linked images, the Javascript version is about 1/3 of 
the original size. That’s pretty amazing.

Harbs

> On Jun 25, 2017, at 10:15 PM, Josh Tynjala  wrote:
> 
> I'd also be curious to see size comparisons using gzip too, which is pretty
> standard in the JS world.
> 
> - Josh
> 
> On Jun 25, 2017 10:57 AM, "Harbs"  wrote:
> 
> For kicks I just checked my minified code of my app for equality and
> inequality checks and there were 5466 instances. Just adding strict
> equality would add 3KB to my file size. (out of 1.8 MB, but still...)
> 
> It would be an interesting exercise to see much much adding null
> initialization would add to file size. I would guess that it would be
> significant.
> 
>> On Jun 25, 2017, at 7:36 PM, Josh Tynjala  wrote:
>> 
>> I have yet to hear a good reason not to default to null either.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
No I don’t.

> On Jun 26, 2017, at 1:04 AM, Justin Mclean  wrote:
> 
> you keep forgetting that the closure compiles optimises the code



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-25 Thread Harbs
I’m not sure how you will do that unless you use every part of the SDK.

My point was that I would like to try it on my own app which does have quite 
extensive SDK use (as well as many, many other classes). I will do that if and 
when we have these compiler options in Falcon.

> On Jun 26, 2017, at 1:04 AM, Justin Mclean  wrote:
> 
> I’ll try it out on the whole SDK and report back the results.



Re: git commit: [flex-asjs] [refs/heads/tlf] - Reverted strict equality

2017-06-26 Thread Harbs
Coincidentally I bumped into this today.

While working on a feature we were porting over, we had a RTE due to a value 
unexpectedly being NaN. I was able to quickly look back through the stack trace 
to find where there was arithmetic done with an undefined (due to a an 
uninitialized value being used) and was able to locate the error quickly.

Our specific case was one where there was not getter defined at all for the 
value.

> On Jun 25, 2017, at 8:30 PM, Harbs  wrote:
> 
> However, after thinking about this some more, I’m not sure that the SWF 
> behavior is actually desirable. Adding an uninitiated object to a Number is 
> probably symptomatic of a bug. Getting a result of NaN is probably better 
> than the null object resolving to 0.



[FlexJS] Use of innerHTML

2017-06-27 Thread Harbs
There’s a number of components which use innerHTML for setting text values. 
(ImageAndTextButton, Label, StringItemRenderer, TextButton)

I just came across an article which advises against doing so.[1]

Does anyone have a reason to not use append[2] and/or Node.textContent[3] and 
appendChild[4]?

Harbs

[1]https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#Security_considerations
 
<https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#Security_considerations>
[2]https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append 
<https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append>
[3]https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent 
<https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent>
[4]https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild 
<https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild>



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-27 Thread Harbs
There is no reference to SpriteVisualElement anywhere.

Alex added support to FXG which uses flash.display.Sprite.

Maybe there’s something configured wrong with Maven causing it to get confused 
and  think there’s a dependency on SpriteVisualElement?

Is the latest falcon being built? (There were falcon changes that are required.)

> On Jun 27, 2017, at 9:46 PM, piotrz  wrote:
> 
> Hi Harbs,
> 
> I see that your TLF branch is failing on Maven build [1] with following
> stack: 
> 
> Loading configuration:
> F:\jenkins\jenkins-slave\workspace\FlexJS_Pipeline_tlf-FPPLDH3IED5DAGFHRJL7RRGRIFBYTXXVJMECBOAQYUNMJQLGIAAQ\framework\frameworks\projects\Basic\target\compile-swf-config.xml
> 
> Error: 'spark.core.SpriteVisualElement' could not be found in scope.
> 
> 
> 'spark.core.SpriteVisualElement' could not be found in scope.
> 
> [1]
> https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Pipeline/job/tlf/8/
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62643.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS,TLF] Tlf branch and Maven build

2017-06-28 Thread Harbs
Yes. You need that branch.

> On Jun 28, 2017, at 9:34 AM, yishayw  wrote:
> 
> I'll try switching falcon to tlf branch. I was using release up to now.
> 
> 
> 
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-TLF-Tlf-branch-and-Maven-build-tp62452p62657.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
My suggestion was to copy it and prune the ones that are not used.

> On Jun 29, 2017, at 9:49 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> AllCSSValuesImpl - is not enough performant cause of lack of strict 
>> comparison ?
> 
> Just the large number of styles.When Harbs added it he said "It has a LOT of 
> styles, so it’s probably best to not use in as-is in deployed apps…”
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
And it was about AllCSSStyles and not AllCSSValuesImpl. I see no reason to not 
use that one.

> On Jun 29, 2017, at 10:14 AM, Harbs  wrote:
> 
> My suggestion was to copy it and prune the ones that are not used.
> 
>> On Jun 29, 2017, at 9:49 AM, Justin Mclean  wrote:
>> 
>> Hi,
>> 
>>> AllCSSValuesImpl - is not enough performant cause of lack of strict 
>>> comparison ?
>> 
>> Just the large number of styles.When Harbs added it he said "It has a LOT of 
>> styles, so it’s probably best to not use in as-is in deployed apps…”
>> 
>> Thanks,
>> Justin
> 



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
That was before his response. Sorry I never responded to Alex, but once he 
explained himself, I do agree with what he wrote.

Considering we have AllCSSValuesImpl, I think that should be the default for 
apps which are expecting HTML CSS.

Just swap that out in your app, and everything should be fine.

Harbs

> On Jun 29, 2017, at 10:26 AM, Justin Mclean  wrote:
> 
> Hi,
> 
> But you did agreed that the code in question should stay in CSSValuesImpl.
> 
> From you last email in that thread:
> 
> "I agree with Justin on this. I don’t see why numeric font weights is 
> different than backgroundImage for example. Not every app uses 
> backgroundImage, but it should work if used. The same should be for numeric 
> font weights considering fontWeight is a supported style.
> 
> If anything, I could hear an argument that the simplest implementation should 
> be even simpler than it currently is and only handle strings which could be 
> used without conversion. The “simplest useful implementation” should contain 
> Justin’s fix.”
> 
> Serval other people also agreed in that thread the code should stay in that 
> class as it’s fixing a bug with an existing style rather than adding new 
> functionallity.
> 
> Greg did have a suggestion that involved renaming the existing class and 
> breaking it up but no has got around to doing that yet.
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
A font weight of 600 will fail in Flash. It’s CSS that only works in HTML.

> On Jun 29, 2017, at 10:49 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> Considering we have AllCSSValuesImpl, I think that should be the default for 
>> apps which are expecting HTML CSS.
> 
> It’s not about HTTML CSS.
> 
> This code:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Will compile with no warnings but fail to work without the fix.
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
I’m not sure what your point is.

That’s why you should use 

SimpleCSSValuesImpl is supposed to be a simple implementation which works the 
same in Flash and HTML. AllCSSValuesImpl is supposed to be an implementation 
which works with valid HTML CSS.

Thanks,
Harbs

> On Jun 29, 2017, at 11:34 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> A font weight of 600 will fail in Flash.
> 
> It compiles with no warnings and displays the text correctly. There is no run 
> time error but if you mean by “fail” it doesn't set the text to font weight 
> to 600 then that’s correct. That is expected as 600 is not a supported value 
> for font weight in AS / flash.
> 
> However without the fix we have the same issues on JS in that it will ignore 
> the font weight being set to 600. This is unexpended behaviour in that it’s 
> ignoring a valid value. Again it will compile and give no warnings or run 
> time errors.
> 
> Here’s the code for a full application if you want to try it out.
> 
> 
> http://ns.adobe.com/mxml/2009";
>xmlns:js="library://ns.apache.org/flexjs/basic">
> 
>
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
> 
> 
> With my fix it works as expected in JS i.e. the two lines are different sizes.
> 
> Thanks,
> Justin



Re: [FLEXJS][FALCONJX] Variable Initialization, equality, etc.

2017-06-29 Thread Harbs
I ran it multiple times on multiple browsers and I did not see a repeatable 
pattern. The different comparisons were sometimes faster but on the next run, 
the faster one might have been slower.

No matter what pattern is used, there’s no significant difference. The only 
thing that was constant was that Chrome was roughly twice as fast as Firefox 
and the Flash version took about 3 times as long in Chrome. I did not bother 
testing the Flash version in Firefox because I have the debug Flash plugin 
installed there.

Harbs

> On Jun 29, 2017, at 10:23 AM, Alex Harui  wrote:
> 
> Now that the release is out, I spent some more time looking into the issue
> of what variables should be initialized and thus, how we should handle
> equality testing (==, ===, etc).  My conclusion remains the same:  there
> is no one right answer.  But I saw some interesting things.
> 
> I started with the test case in
> https://issues.apache.org/jira/browse/FLEX-35330 and added to it.  I was
> concerned that the test case loop performance could be skewed by runtime
> loop optimizations.  Our code doesn't have many long loops.  Our equality
> testing is scattered throughout the code as objects are instantiated and
> user interaction causes changes.  And also note, one of the points of
> beads and PAYG is to reduce the number of equality tests in the final
> output.  IOW, if your app isn't going down both code paths of an if
> statement, then a lightweight bead could eliminate that test.
> 
> So, I wanted to make sure any runtime code flow would think that the loop
> variables might change so they don't extract it to a constant outside of
> the loop.  I decided to use the Date() class and its getFullYear() as the
> thing that might change but doesn't.  You can see the newer test by
> downloading Main.mxml
> http://home.apache.org/~aharui/FlexJS/FLEX35330/src/Main.mxml
> 
> The "work" in the loop now looks more like:
>var obj:Object;
>var now:Date = new Date();
>if (now.getFullYear() < 2016)
>obj = {}; // should never get here, but flow analysis shouldn't
> know that
>return (obj != null) ? Math.random() : 0;
> 
> 
> The JS version of the test is here:
> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin/js-release/
> The SWF version of the test is here:
> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin-debug/
> 
> For me, the SWF version is considerably slower.  The JS version can run a
> test in 200ms that takes Flash 12000ms!
> 
> But more interestingly, this version of the test also checks the code
> pattern:
> 
>  if (someObject)
> 
> And for me, on both SWF and JS, I'm seeing that run as fast or faster for
> "boolean" as using strict equality:
> 
>  if (someObject === true)
> 
> Do others see that?  Because if that's true (and it isn't a bug in the
> test), given that "if (someObject)" doesn't require boolean variable
> initialization and is smaller code on both platforms, it seems like that
> would be a pattern the compiler should support and would get my vote as
> the default pattern.
> 
> We certainly want to support those that want to use strict equality in
> places where "*' isn't used, but in this test, the difference is
> negligible.  Google Closure Compiler isn't currently smart about member
> variable initialization so each initialized variable adds a few bytes to
> the minified JS.  It might GZIP out.  I didn't try that yet.
> 
> Google's optimizer/minifier is pretty aggressive about code rewriting.
> The snippet above ends up looking something like:
>  var a=null;2016>(new Date).getFullYear()&&(a={});return
> null!=a?Math.random():0
> 
> It got me thinking about an option where the compiler will rewrite usage
> of strict equality where there is almost no performance difference in
> order to reduce code size and number of variables that need initialization.
> 
> Again, we don't have to all agree.  We can teach the compiler to do
> different things at different points.
> 
> Thoughts?
> -Alex
> 
> 
> 



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
No. It’s there.

Make sure you have commit af1f5c9 in your build of Core.

> On Jun 29, 2017, at 12:21 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> That’s why you should use 
> 
> You can’t in this case as it doesn’t compile with the following error:
> 
> This tag could not be resolved to an ActionScript class. It will be ignored.
> 
>
> 
> So somehow you need to include one on one platform and one on the other in 
> MXML I’m not sure if our compiler currently supports that.
> 
> Thanks,
> Justin



Re: [FLEXJS][FALCONJX] Variable Initialization, equality, etc.

2017-06-29 Thread Harbs

> On Jun 29, 2017, at 12:19 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> The JS version of the test is here:
>> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin/js-release/ 
>> 
>> The SWF version of the test is here:
>> http://home.apache.org/~aharui/FlexJS/FLEX35330/bin-debug/
>> 
>> For me, the SWF version is considerably slower.  The JS version can run a
>> test in 200ms that takes Flash 12000ms!
> 
> You might want to try a non debug version of the swf.

It’s still considerably slower. (See my last response.)

> 
>> And for me, on both SWF and JS, I'm seeing that run as fast or faster for
>> "boolean" as using strict equality:
>> 
>> if (someObject === true)
>> 
>> Do others see that?
> 
> No but there’s not much in it.
> 
> j = 0 if (initialisedBoolean) : 284
> j = 0 if (initialisedBoolean == true) : 309
> j = 0 if (initialisedBoolean === true) : 276
> j = 0 if (initialisedLocalBoolean) : 202
> j = 0 if (initialisedLocalBoolean == true) : 233
> j = 0 if (initialisedLocalBoolean === true) : 191
> 
> I don’t see any tests for uninitialisedBoolean’s and true in there.

No idea what you looked at, but you should get something like this:
100
j = 0 if (uninitializedObject) : 409
j = 0 if (uninitializedObject != null) : 426
j = 0 if (uninitializedObject !== undefined) : 447
j = 0 if (initialisedObject) : 393
j = 0 if (initialisedObject != null) : 403
j = 0 if (initialisedObject !== null) : 415
j = 0 if (uninitialisedBoolean) : 429
j = 100 if (uninitialisedBoolean != false) : 440
j = 100 if (uninitialisedBoolean !== false) : 389
j = 0 if (initialisedBoolean) : 389
j = 0 if (initialisedBoolean == true) : 377
j = 0 if (initialisedBoolean === true) : 397
j = 0 if (unInitializedNumber) : 417
j = 0 if (!isNaN(unInitializedNumber)) : 439
j = 0 if (initializedNumber) : 457
j = 0 if (!isNaN(initializedNumber)) : 453
j = 0 if (uninitializedLocalObject) : 427
j = 0 if (uninitializedLocalObject != null) : 480
j = 0 if (uninitializedLocalObject !== undefined) : 424
j = 0 if (initialisedLocalObject) : 394
j = 0 if (initialisedLocalObject != null) : 408
j = 0 if (initialisedLocalObject !== null) : 376
j = 0 if (uninitialisedLocalBoolean) : 410
j = 0 if (uninitialisedLocalBoolean != false) : 401
j = 0 if (uninitialisedLocalBoolean !== false) : 398
j = 0 if (initialisedLocalBoolean) : 387
j = 0 if (initialisedLocalBoolean == true) : 379
j = 0 if (initialisedLocalBoolean === true) : 412
j = 0 if (unInitializedLocalNumber) : 411
j = 0 if (!isNaN(unInitializedLocalNumber)) : 452
j = 0 if (initializedLocalNumber) : 400
j = 0 if (!isNaN(initializedLocalNumber)) : 735
j = 0 if (bool1 == bool2) : 1177
j = 0 if (bool1 ? !bool2 : bool2) : 1438
j = 0 if ((bool1 ? 1 : 0) ^ (bool2 ? 1 : 0)) : 796
>> given that "if (someObject)" doesn't require boolean variable
>> initialization
> 
> Without initialisation you can get type conversion in some cases and it is 
> likely to be slower. Without initialisation you will also still have this 
> issue in that (undefined == false) is false which can cause a number of bugs. 
> Code like this (someBool == false) and (!someBool) will give different 
> results depending if you initialise the boolean to false or not.

There are tests for both, and you DON’T get type conversions unless it’s 
required. Browsers are smarter than that.

>> Again, we don't have to all agree.  We can teach the compiler to do
>> different things at different points.
> 
> Sure.
> 
> Thanks,
> Justin



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
Check your basic-manifest.xml for Core.

Do you see 

Re: [FLEXJS][FALCONJX] Variable Initialization, equality, etc.

2017-06-29 Thread Harbs
Right.

Using the spec is a poor way of knowing how JS engines actually implement the 
functionality. If they can get functionally equivalent results that perform 
better by using slightly different steps, they will.

Based on the tests, it looks like browsers do NOT do type conversions:

j = 0 if (uninitialisedLocalBoolean != false) : 401
j = 0 if (uninitialisedLocalBoolean !== false) : 398

Those are using “== true” and “=== true” respectively.

I’m going to keep repeating myself until the performance argument dies down. 
Performance is NOT a reason to do initialization or strict comparison. Behavior 
and likelihood of bugs are both valid arguments, but performance is simply not 
an argument here.

The question that I think Alex is looking at, is whether the compiler can 
handle boolean comparisons without initialization so it would do the right 
thing without a performance hit. I’d be interested in hearing his findings.

Thanks,
Harbs

> On Jun 29, 2017, at 1:07 PM, Justin Mclean  wrote:
> 
> HI,
> 
>> There are tests for both, and you DON’T get type conversions unless it’s 
>> required. Browsers are smarter than that.
> 
> See [1] and follow the path if x in undefined and y is a boolean and true.
> 
> Compare this with [2]
> 
> Thanks,
> Justin
> 
> 1. https://es5.github.io/#x11.9.3 <https://es5.github.io/#x11.9.3>
> 2. https://es5.github.io/#x11.9.6 <https://es5.github.io/#x11.9.6>



Re: git commit: [flex-asjs] [refs/heads/develop] - Fix merge error removing support for numeric font size.

2017-06-29 Thread Harbs
Yes.

> On Jun 29, 2017, at 12:54 PM, Justin Mclean  wrote:
> 
> Did you actually try using that class / compiling it?



Re: [FlexJS] question about porting an Adobe Flex 3 project to HTML+JS

2017-06-30 Thread Harbs
I suggest you watch the getting started video by Yishay and the VS Code video 
by Josh.

Don’t try to port to Flex 4 first. It should not be significantly different 
porting from Flex 3 or Flex 4. If anything, porting from Flex 3 should be more 
straight-forward because the architecture is simpler.

To set some expectations:

You cannot expect to just copy your UI code as-is. You will need to rewrite 
your view using FlexJS components. Many of them will be simple replacements 
(i.e.  instead of  etc. but the event subsystem is 
different, and binding is different (you need to declare which kind of binding 
you need), skinning is different and much of the functionality is different. 
Layout is definitely different.

You will need to wrap your head around strands and beads. (Basically, you have 
a list of beads which defines what look and behavior your components have.)

We’re here to help.

Good luck!
Harbs

> On Jun 30, 2017, at 3:19 PM, Allen YANG  wrote:
> 
> Hi Team,
> I have a Flex 3 project that was built on Adobe Flash Builder 3.6 (SDK Flex 
> 3.6A); it needs to be ported to support a non-flash environment.  This 
> program was not originally written by me; but I have software development 
> experience.
> I installed a trial version of Flash Builder 4.7 on my Windows 7 machine, 
> then installed JDK 1.8.0_131 and replaced the Flash Builder's JRE with the 
> new JRE version; installed FlexJS 0.8.0 using FlexFlex SDK installer, and 
> successfully built and ran the example project, thanks to Alex Harui's  
> [Using FlexJS with Adobe Flash 
> Builder]<https://cwiki.apache.org/confluence/display/FLEX/Using+FlexJS+with+Adobe+Flash+Builder>
>  wiki page.  I have also gone over the Youtube video of [Migrating from Flex 
> to 
> FlexJS<https://www.youtube.com/watch?v=-FcLs0O-BWQ&list=PLbzoR-pLrL6pLDCyPxByWQwYT>]
>  by Harbs (I have to admit that video is a bit over my head now)
> 
> I am looking for advices what will be the best approach for me to do the 
> porting. Questions I have are:
> 
> (a)Should I start by converting the project from Flex 3 to Flex 4 first 
> using Flash Builder 4.7's own Flex 4.6.0 SDK; and if it is successful, then 
> convert the Flex 4 project to HTML+JS using FlexJS SDK?  Or it is better to 
> directly migrate from Flex 3 to HTML+JS using FlexJS SDK?
> 
> (b)If I convert to Flex 4 first, then I am trying to prepare my browsers 
> for debugging in a Flash environment. My most frequently used browser is 
> Google Chrome.  I found that there is no easy way to replace Chrome's flash 
> player, starting Chrome version 57, by the debug version downloadable from 
> Adobe.  Could anyone advise me how to set that up for debugging?
> 
> (c)Could someone recommend the URLs that will help me to get prepared and 
> educated about porting an existing Flex project by FlexJS, especially 
> regarding the name spaces and comboBox.
> 
> One of my MXML files looks like:
> 
> http://www.adobe.com/2006/mxml";
>   xmlns:net="flash.net.*"
>   verticalAlign="middle" horizontalAlign="center" layout="absolute"
>   xmlns:dropdown="components.*"
>   xmlns:controls="com.iwobanas.controls.*"
>   xmlns:local="*"
>xmlns:dataGridClasses="com.iwobanas.controls.dataGridClasses.*"
>applicationComplete="appInit();">
> 
> 
>   
> 
> ...
> 
> Thanks and Regards,
> Allen
> 
> Allen Yang
> Raritan, Inc.
> 
> 
> 
> 
> 
> 
> 
> Ce message, ainsi que tous les fichiers joints ? ce message, peuvent contenir 
> des informations sensibles et/ ou confidentielles ne devant pas ?tre 
> divulgu?es. Si vous n'?tes pas le destinataire de ce message (ou que vous 
> recevez ce message par erreur), nous vous remercions de le notifier 
> imm?diatement ? son exp?diteur, et de d?truire ce message. Toute copie, 
> divulgation, modification, utilisation ou diffusion, non autoris?e, directe 
> ou indirecte, de tout ou partie de ce message, est strictement interdite.
> 
> 
> This e-mail, and any document attached hereby, may contain confidential 
> and/or privileged information. If you are not the intended recipient (or have 
> received this e-mail in error) please notify the sender immediately and 
> destroy this e-mail. Any unauthorized, direct or indirect, copying, 
> disclosure, distribution or other use of the material or parts thereof is 
> strictly forbidden.



Re: [FalconJX] Slower builds after dual merge

2017-06-30 Thread Harbs
I initially thought that I was getting slower build times, but I’m no longer so 
sure.

Using these options, I’m getting roughly 10 second build times

--debug=true
--targets=JSFlex

That’s about the same as I was getting before the switch to dual.

Using debug=false sometimes takes over 3 minutes. I have no way of comparing 
that to before the dual branch because minification was broken for me before 
the switch. I don’t know how much of the time is being spent by Falcon and how 
much by the Google Closure compiler.

I do think a verbose flag is a good idea. I definitely like the fact that it 
spits out the specified options at the beginning, and unlesss a terse flag is 
used, I’d like that output.

Another thing to look at is why I’m getting swf output even though I’m using 
-targets=JSFlex.

> On Jun 30, 2017, at 5:49 PM, Josh Tynjala  wrote:
> 
> Some folks mentioned that the compiler has gotten slower after the dual
> merge. I recall that it's true even with a debug build and only a single
> target. It occurred to me that this could be because the compiler writes
> significantly more to the console in 0.8 than it did in previous versions.
> Now, I understand that this is useful for debugging the compiler, so I
> understand if we don't want to remove it. However, I wonder if most of the
> console output should be skipped by default, and some kind of -verbose=true
> flag can be set when it's needed.
> 
> - Josh



Re: [FlexJS] question about porting an Adobe Flex 3 project to HTML+JS

2017-06-30 Thread Harbs
They have build scripts for both Ant and Maven.

You can probably build them using any one of the other build chains, but those 
are the only build scripts included.

Harbs

> On Jun 30, 2017, at 6:07 PM, Allen YANG  wrote:
> 
> Piotr,
> Thank you.  Are these examples all built on Maven?
> Best Regards,
> Allen
> 
> -Original Message-
> From: piotrz [mailto:piotrzarzyck...@gmail.com]
> Sent: Friday, June 30, 2017 10:45 AM
> To: dev@flex.apache.org
> Subject: RE: [FlexJS] question about porting an Adobe Flex 3 project to 
> HTML+JS
> 
> Allen,
> 
> A lot of examples you can find on our github[1]
> 
> [1]
> https://github.com/apache/flex-asjs/tree/apache-flex-flexjs-0.8.0/examples/flexjs
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-question-about-porting-an-Adobe-Flex-3-project-to-HTML-JS-tp62698p62711.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
> 
> 
> 
> Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir 
> des informations sensibles et/ ou confidentielles ne devant pas être 
> divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous 
> recevez ce message par erreur), nous vous remercions de le notifier 
> immédiatement à son expéditeur, et de détruire ce message. Toute copie, 
> divulgation, modification, utilisation ou diffusion, non autorisée, directe 
> ou indirecte, de tout ou partie de ce message, est strictement interdite.
> 
> 
> This e-mail, and any document attached hereby, may contain confidential 
> and/or privileged information. If you are not the intended recipient (or have 
> received this e-mail in error) please notify the sender immediately and 
> destroy this e-mail. Any unauthorized, direct or indirect, copying, 
> disclosure, distribution or other use of the material or parts thereof is 
> strictly forbidden.



Re: [FlexJS] PAYG definitions and guidance, Please participate

2017-07-02 Thread Harbs
Great start.

I just made some additions and changes. Hopefully I helped make it clearer and 
not the other way around… ;-)

I just want to say, that while PAYG is hard both from a framework development 
perspective and from an application development perspective, I firmly believe 
that strict adherence to the concepts are worthwhile. I say this after using 
FlexJS full time on both sides of the equation for more than a year.

We DEFINITELY want to make it easier for application developers to get started, 
and hopefully the Express set is a step in the right direction. We also 
DESPERATELY need better documentation and guides. Unfortunately most of us are 
not great writers. :-(

Harbs

> On Jul 2, 2017, at 1:40 AM, Greg Dove  wrote:
> 
> Thanks Alex,
> 
> I look forward to your feedback. It would be great to see  (from you or
> anyone else) -  within this thread - suggested improvements/corrections or
> other topics that should be added, or questions that should be addressed.
> 
> I know there are areas that need improvement in a number of areas of the
> document, but I'm hoping that this will be 'fixed' by making it a shared
> goal and getting input from others, not by me kludging away in the
> background. I wanted to get something up that is a starting point only.
> 
> I do understand the avoidance of the 'swiss army knife' approach to base
> classes in Flex 4, but had wondered about whether we were focusing on the
> 19% of functionality that might be useful for 5% of developers (Basic) vs.
> the 20% of that will suit 80% of developers (e.g. express) -I'm not saying
> that the pareto relationships there are correct, just using it for
> 'relative' comparison. But I think it is just a case of getting used to a
> new way to thinking, which is different to Flex4 (and Flex3). It would be
> really great if you can lead a thread specifically about this.
> 
> I also suspect there will be no 'one true way' to make incremental
> functionality beads either. But documenting the pros and cons of each
> approach (which we already started in one of the other threads) might
> provide useful guidance about when to choose which approach (inheritance
> and/or utility functions etc). I'm looking forward to that discussion
> because I think I was getting a lot out of the earlier discussion on that
> already.
> 
> In the end writing these things in a document is not something I call fun.
> "I'd much rather be coding". But I do believe that having 'team-sourced'
> content, as an output of focused list discussions, could make the
> generation of the document content a much easier process, and that the
> process itself could help  improve decision quality, build consensus, and
> provide resources that will be useful for team alignment and future
> reference info for others. I think any one of those reasons is enough for
> me to stop trying to create more of the content myself!
> 
> 
> 
> On Sun, Jul 2, 2017 at 3:57 AM, Alex Harui  wrote:
> 
>> Hi Greg,
>> 
>> Thanks for writing this up.  I took a quick read.  I'll do a more careful
>> read next week and have more detailed comments.  One thing I wanted put up
>> for discussion now is the notion of "defaults".  Really, I'm trying to get
>> away from the notion that there is one default we have to decide on.  IMO,
>> that's another old way of thinking from Flex.  FlexJS is designed to
>> support multiple component sets.  Express will have different defaults.
>> MDL has different defaults.  The Basic set has a particular design goal
>> (feature parity with SWF) and thus will have different defaults.  There is
>> often no one right answer, so we build different component sets and folks
>> will try them and decide for themselves.
>> 
>> Thoughts?
>> -Alex
>> 
>> On 6/30/17, 3:29 PM, "Greg Dove"  wrote:
>> 
>>> Following on from other discussions, I have made a start on something here
>>> https://na01.safelinks.protection.outlook.com/?url=
>> https%3A%2F%2Fcwiki.apa
>>> che.org%2Fconfluence%2Fpages%2Fviewpage.action%3FpageId%
>> 3D71013028&data=02
>>> %7C01%7C%7C35f519d4ea87431fd80808d4c0078bc3%
>> 7Cfa7b1b5a7b34438794aed2c178de
>>> cee1%7C0%7C0%7C636344586020292933&sdata=aj4YiAsUQDGoW5Bf%
>> 2BQ2wyJxgqmguZ18T
>>> Zng2jGcWIkY%3D&reserved=0
>>> 
>>> In the end this will only work if people want to do it. But I do believe
>>> that one way of getting everyone on the same page here (and we do have
>>> clear signs that not everyone is), is to, quite literally, get everyone on
>>> the same page :).
>>>

Re: [FlexJS] PAYG definitions and guidance, Please participate

2017-07-02 Thread Harbs
I agree with this.

If I had to pick the single-most difficult thing when migrating from Flex to 
FlexJS, it would be layout.

The new layout beads are definitely improved over the older ones, but layout is 
not always necessarily as intuitive or performant as it might be.

On the one hand, we don’t have constrained layout like we used to have in 
classic Flex. Being able to pin elements to specific locations relative to 
their containers and have it move/resize automatically by just specifying 
top,bottom,left and right values as well as percentages was REALLY convenient. 
To do that properly, we would need a more robust layout cycle than we currently 
have which brings along the overhead inherent with that.

On the other hand, even the basic CSS based layout we have probably has too 
much reliance in DOM to be as performant as it otherwise might be.

I imagine that we will ultimately have layout beads which go in both directions 
relative to what we currently have: Leaner beads which are more performant, and 
more robust beads which have more ease of layout.

Harbs

> On Jul 2, 2017, at 9:44 AM, Alex Harui  wrote:
> 
> Documentation is always a good thing, but as I've said several times, this
> is bleeding-edge development.  I'm just not sure we are ready to start
> paving roads and putting up street signs.  In Flex 0.8.0, we overhauled
> the Layout subsystem and there are still things I don't like about it.
> I'll bet there is one more overhaul coming up.  I'm also pretty sure that
> layout gets called too often but I won't know how to optimize until Harbs
> or others get to the "last mile" and really start focusing on performance.



Re: [FlexJS] PAYG definitions and guidance, Please participate

2017-07-02 Thread Harbs
I think Alex was talking about default components.

MDL is a pretty good example. An MDL app has a certain look and feel. All the 
necessary functionality is built into the component set by default.

The point is that there are different classes of applications. Each class of 
applications should have its own set of components which have their own 
defaults. Some ideas (not necessarily realistic):

1. Skin swappable need to have their skinning changeable at runtime.
2. Widget heavy
3. Visualization apps.
4. Animation heavy apps.
5. Performance sensitive apps

Until FlexJS starts being used for real, we’re not going to know exactly how 
the component sets need to be structured. MDL is designed for a specific app 
that’s (sort of) well defined. Express is an attempt at a “general” app 
requirement, but who knows if it’s really the right default for a specific 
class of apps.

So basically, if I’m building a “foo” app, I’d pick the “foo” widget set as the 
starting point and that gets me pretty fart along to where I need to be. For 
this to be realistic, the Basic set needs to be as modular as possible. Hence 
PAYG and extremely modular bead architecture is critical. The thing to keep in 
mind is that Basic is not a default for anything by design. It’s a collection 
of “smallest useful functionality” that can be put together like lego. And 
that’s really the point of PAYG.

This is a really critical piece and I think some folks are not quite getting 
this and that’s creating confusion about the goals and benefit of PAYG. It’s 
not like we’re doing a bad job with Basic, so we have Express to fix that. 
Basic is the goal of the framework and Express is just one way of many possible 
ways of using it.

I don’t think I got it either when I started with FlexJS. I thought Alex was 
being extreme with his use of PAYG and splitting up of beads. However, I went 
along with it, and with time, I see the wisdom of this approach.

Thanks,
Harbs

> On Jul 2, 2017, at 4:44 PM, yishayw  wrote:
> 
> Alex Harui-2 wrote
>> One thing I wanted put up
>> for discussion now is the notion of "defaults".  Really, I'm trying to get
>> away from the notion that there is one default we have to decide on.  IMO,
>> that's another old way of thinking from Flex.  FlexJS is designed to
>> support multiple component sets.  Express will have different defaults.
>> MDL has different defaults.  The Basic set has a particular design goal
>> (feature parity with SWF) and thus will have different defaults.  There is
>> often no one right answer, so we build different component sets and folks
>> will try them and decide for themselves.
>> 
>> Thoughts?
>> -Alex
> 
> Probably needs to be in a separate thread, but I'm not sure what you're
> asking. Default beads? Default attribute values? My intuition is that the
> default value matches the most common use case. Hence, UIBase is by default
> visible.
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-PAYG-definitions-and-guidance-Please-participate-tp62738p62759.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [ANNOUNCE] Apache FlexJS 0.8.0 and Apache Flex FalconJX 0.8.0 Released

2017-07-03 Thread Harbs
It looks like something is messed up with the mirror.

I’ve never spent the time to figure out how the installer works… :-(

> On Jul 3, 2017, at 9:35 AM, piotrz  wrote:
> 
> I just tried it and also have problems [1]
> 
> [1] https://paste.apache.org/wWPR
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/ANNOUNCE-Apache-FlexJS-0-8-0-and-Apache-Flex-FalconJX-0-8-0-Released-tp62718p62765.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [ANNOUNCE] Apache FlexJS 0.8.0 and Apache Flex FalconJX 0.8.0 Released

2017-07-03 Thread Harbs
Did Apache change something with preferred mirrors?

> On Jul 3, 2017, at 10:08 AM, Harbs  wrote:
> 
> It looks like something is messed up with the mirror.
> 
> I’ve never spent the time to figure out how the installer works… :-(
> 
>> On Jul 3, 2017, at 9:35 AM, piotrz  wrote:
>> 
>> I just tried it and also have problems [1]
>> 
>> [1] https://paste.apache.org/wWPR
>> 
>> Piotr
>> 
>> 
>> 
>> -
>> Apache Flex PMC
>> piotrzarzyck...@gmail.com
>> --
>> View this message in context: 
>> http://apache-flex-development.247.n4.nabble.com/ANNOUNCE-Apache-FlexJS-0-8-0-and-Apache-Flex-FalconJX-0-8-0-Released-tp62718p62765.html
>> Sent from the Apache Flex Development mailing list archive at Nabble.com.
> 



Re: [ANNOUNCE] Apache FlexJS 0.8.0 and Apache Flex FalconJX 0.8.0 Released

2017-07-03 Thread Harbs
This is probably the issue:
http://archive.apache.org/dist/flex/flexjs/0.5.0/binaries/"; 
file="apache-flex-flexjs-0.5.0-bin"/>
http://archive.apache.org/dist/flex/flexjs/0.6.0/binaries/"; 
file="apache-flex-flexjs-0.6.0-bin"/>
http://archive.apache.org/dist/flex/flexjs/0.6.0/binaries/"; 
file="apache-flex-flexjs-0.7.0-bin"/>
https://paste.apache.org/SCdX
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/ANNOUNCE-Apache-FlexJS-0-8-0-and-Apache-Flex-FalconJX-0-8-0-Released-tp62718p62769.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [ANNOUNCE] Apache FlexJS 0.8.0 and Apache Flex FalconJX 0.8.0 Released

2017-07-03 Thread Harbs
Fixed.

> On Jul 3, 2017, at 11:15 AM, piotrz  wrote:
> 
> Hi Harbs,
> 
> Thanks! Awesome!
> 
> Let me know and I will at least test it. Didn't have enough time todays
> morning to look into that. 
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/ANNOUNCE-Apache-FlexJS-0-8-0-and-Apache-Flex-FalconJX-0-8-0-Released-tp62718p62771.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: git commit: [flex-asjs] [refs/heads/tlf] - First implementation of FileProxy which takes on some of the functions of FileReference in Flash. More beads coming soon.

2017-07-03 Thread Harbs
Not sure. It relies on Network. Adding it to Storage would add a Network 
dependency to Storage.

> On Jul 3, 2017, at 2:40 PM, piotrz  wrote:
> 
> Another thing which come up to my mind is - Maybe this FileProxy
> implementation should be included in Storage module. 
> 
> Just thinking loudly.
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-First-implementation-of-FileProxy-which-takes-on-some-of-the--tp62775p62776.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



TLF Branch merged back

2017-07-03 Thread Harbs
I just merged the TLF branch back into develop.

TLF is still “alpha quality”, so unless you do a LOT of custom work on a 
proprietary text engine, it’s not going to be very useful. However, it’s 
already useful to me, so it might be useful to someone else.

I might keep the TLF branch live in case I make any major changes there, but 
I’m not sure yet. Either way, most of my commits will be going into develop at 
this point.

Speaking of branches:
I’m not sure what we decided vis a vis feature branches. I think we were 
supposed to be focusing on development on feature branches and merging those in 
when a feature is complete. Is that right?

Harbs

Feature Branches (was Re: TLF Branch merged back)

2017-07-03 Thread Harbs
I just looked at what you did there. Makes sense.

I think we should have some kind of consensus on what should be done in feature 
branches and should there be some kind of naming convention for these branches.

For example, I’m writing some code for browser and version detection. (Browser 
bugs REALLY suck. I discovered today that Chrome introduced a new bug where an 
opaque background is drawn on nested SVG elements which have a blend-mode 
applied.) Anyway, it’s a new feature, but VERY unlikely to break anything. 
Should that go into a separate branch or should I not bother?

My preference is to only bother with feature branches for changes that have a 
decent chance of breaking things. I don’t really care about naming convetions, 
but naming a branch with a JIRA id for cross-referencing JIRA fixes makes sense.

Thanks,
Harbs

> On Jul 3, 2017, at 4:29 PM, piotrz  wrote:
> 
> Harbs,
> 
> In case of your TLF my thoughts was always that it would be good if we will
> have it in develop, cause you are fixing a lot of things not only related to
> TLF. - Personally I don't have anything against that you are putting all to
> develop.
> 
> But if someone is going to do some other feature - it would be good to have
> jira + separate branch placed in feature folder, as I did it with
> DropDownList for MDL.
> 
> That is mine view.
> 
> Thanks for merge!
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/TLF-Branch-merged-back-tp62779p62780.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



[Legal] Code from Stack Overflow

2017-07-03 Thread Harbs
I would like to include some code from Stack Overflow, but I’m not sure what 
the guidance is regarding that. My specific use case is some code here.[1]

I went poking around on SO, to discover what the licensing terms on code there 
and discovered that for code before March 1 2016 code was licensed under 
CC-BY-SA. after March 1, 2016 it’s licensed under MIT.[2]

My understanding is that CC-BY-SA is “strong copyleft” and not really 
compatible with Apache licensing. Is that right? Does that mean we can not use 
even small code snippets from SO from before March 2016?

For code from after March 2016, where should attribution be put? Should a link 
be included in the code? A mention of the author in NOTICE? Should we include a 
link back to the SO post?

Should this be asked on legal?

Harbs

[1]https://stackoverflow.com/a/2401861
[2]https://meta.stackexchange.com/questions/272956/a-new-code-license-the-mit-this-time-with-attribution-required?cb=1

Re: Installer Problems

2017-07-03 Thread Harbs
I tried and this time it worked.

Earlier today I got the same error that others reported.

> On Jul 3, 2017, at 9:06 PM, piotrz  wrote:
> 
> Hi Alex,
> 
> I just tried and got error [1] same as previous I think.
> 
> [1] https://paste.apache.org/90UQ
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Installer-Problems-tp62791p62792.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: Installer Problems

2017-07-03 Thread Harbs
However,. it looks like it still download it from Downloading Apache FlexJS 
from:http://www-us.apache.org/dist/flex/flexjs/0.8.0/binaries/

> On Jul 3, 2017, at 9:27 PM, Harbs  wrote:
> 
> I tried and this time it worked.
> 
> Earlier today I got the same error that others reported.
> 
>> On Jul 3, 2017, at 9:06 PM, piotrz  wrote:
>> 
>> Hi Alex,
>> 
>> I just tried and got error [1] same as previous I think.
>> 
>> [1] https://paste.apache.org/90UQ
>> 
>> Thanks,
>> Piotr
>> 
>> 
>> 
>> -
>> Apache Flex PMC
>> piotrzarzyck...@gmail.com
>> --
>> View this message in context: 
>> http://apache-flex-development.247.n4.nabble.com/Installer-Problems-tp62791p62792.html
>> Sent from the Apache Flex Development mailing list archive at Nabble.com.
> 



Re: Installer Problems

2017-07-03 Thread Harbs
Yeah. That’s probably the issue with AIR 25 being too big…

> On Jul 3, 2017, at 10:08 PM, piotrz  wrote:
> 
> Alex, Olaf,
> 
> I just tried after some time installer and it's downloaded FlexJS and
> compiler, but it failed in uncompressing Adobe Air 25 [1].
> 
> With configuration FlexJS 0.8.0 and Adobe Air 23 everything is working.
> 
> [1] https://paste.apache.org/C8DQ
> 
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Installer-Problems-tp62791p62800.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: TLF Branch merged back

2017-07-03 Thread Harbs
BTW:

Sorry for forgetting to merge Falcon as well and thanks Alex for taking care of 
it.

> On Jul 3, 2017, at 4:41 PM, Harbs  wrote:
> 
> I just merged the TLF branch back into develop.
> 
> TLF is still “alpha quality”, so unless you do a LOT of custom work on a 
> proprietary text engine, it’s not going to be very useful. However, it’s 
> already useful to me, so it might be useful to someone else.
> 
> I might keep the TLF branch live in case I make any major changes there, but 
> I’m not sure yet. Either way, most of my commits will be going into develop 
> at this point.
> 
> Speaking of branches:
> I’m not sure what we decided vis a vis feature branches. I think we were 
> supposed to be focusing on development on feature branches and merging those 
> in when a feature is complete. Is that right?
> 
> Harbs



Re: Installer Problems

2017-07-04 Thread Harbs
https://www.npmjs.com/package/flexjs 

> On Jul 4, 2017, at 2:13 PM, piotrz  wrote:
> 
> Do we have some alternative to provide users where we can download by SDK
> with all dependencies ? 
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Installer-Problems-tp62791p62817.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



[FlexJS] Use of typeof

2017-07-04 Thread Harbs
I’m trying to figure out how to solve this dilemma:

Browsers attach global variables to window.

Node.js attaches globals to global.

I’m trying to check for the existence of a global called process. In JS, you’d 
generally do that by checking typeof process == ‘undefined’. Falcon does not 
allow you to do that and complains that process is an undefined property. In 
the browser you can use window[“process”] == undefined and in node you can 
(theoretically) use global[“process”] == undefined. I can’t think of a generic 
way to do this though.

Thoughts?
Harbs

Re: Installer Problems

2017-07-04 Thread Harbs
Thanks for taking care of that. :-)

> On Jul 4, 2017, at 8:10 PM, piotrz  wrote:
> 
> Issue has been fixed. Everyone who had the problems can try to download
> FlexJS.
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/Installer-Problems-tp62791p62824.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS] Use of typeof

2017-07-04 Thread Harbs
Thanks. Here’s what I see:

if(typeof window !== "undefined")
{
theConsole = window.console;
}
else if(typeof console !== "undefined")
{
theConsole = console;
}

Did you define console in a typedef maybe?

I’m thinking that Falcon should really allow undefined variables when used with 
“typeof”.

Truth be told, I really need to do something like one of these:
if(typeof (process) != 'undefined' && {}.toString.call(process) == '[object 
process]’)
or:
if(typeof process != 'undefined' && process && process.constructor.name == 
"process”)

Of course every reference to process causes a compiler error. I wonder if 
there’s some way to tell the compiler to accept it without complaining…

> On Jul 4, 2017, at 8:54 PM, Josh Tynjala  wrote:
> 
> I don't remember exactly what I did, but in order to get trace() working in
> Node.js, I had to figure out how to find the console object on window
> versus global. I feel like I remember using typeof, but maybe it was
> something else. Take a look at the implementation of Language.trace() to
> see what I did.
> 
> - Josh
> 
> On Jul 4, 2017 5:26 AM, "Harbs"  wrote:
> 
>> I’m trying to figure out how to solve this dilemma:
>> 
>> Browsers attach global variables to window.
>> 
>> Node.js attaches globals to global.
>> 
>> I’m trying to check for the existence of a global called process. In JS,
>> you’d generally do that by checking typeof process == ‘undefined’. Falcon
>> does not allow you to do that and complains that process is an undefined
>> property. In the browser you can use window[“process”] == undefined and in
>> node you can (theoretically) use global[“process”] == undefined. I can’t
>> think of a generic way to do this though.
>> 
>> Thoughts?
>> Harbs



Re: [FlexJS] Use of typeof

2017-07-04 Thread Harbs
Looks like it.

I see this in missing.js:

/**
 * @export
 * This gets mapped to org.apache.flex.utils.Language.trace() by the compiler
 * @param {...} rest
 */
function trace(rest) {}

/**
 * @type {!Console}
 * @const
 */
var console;


I guess I can add another one like so:

/**
 * @type {!Process}
 * @const
 */
var process;

However, it seems like a drag to have to add a typedef every time a developer 
needs to check for the existence of a global that we did not think of.

> On Jul 4, 2017, at 9:13 PM, Harbs  wrote:
> 
> Thanks. Here’s what I see:
> 
> if(typeof window !== "undefined")
> {
>   theConsole = window.console;
> }
> else if(typeof console !== "undefined")
> {
>   theConsole = console;
> }
> 
> Did you define console in a typedef maybe?
> 
> I’m thinking that Falcon should really allow undefined variables when used 
> with “typeof”.
> 
> Truth be told, I really need to do something like one of these:
> if(typeof (process) != 'undefined' && {}.toString.call(process) == '[object 
> process]’)
> or:
> if(typeof process != 'undefined' && process && process.constructor.name == 
> "process”)
> 
> Of course every reference to process causes a compiler error. I wonder if 
> there’s some way to tell the compiler to accept it without complaining…
> 
>> On Jul 4, 2017, at 8:54 PM, Josh Tynjala  wrote:
>> 
>> I don't remember exactly what I did, but in order to get trace() working in
>> Node.js, I had to figure out how to find the console object on window
>> versus global. I feel like I remember using typeof, but maybe it was
>> something else. Take a look at the implementation of Language.trace() to
>> see what I did.
>> 
>> - Josh
>> 
>> On Jul 4, 2017 5:26 AM, "Harbs"  wrote:
>> 
>>> I’m trying to figure out how to solve this dilemma:
>>> 
>>> Browsers attach global variables to window.
>>> 
>>> Node.js attaches globals to global.
>>> 
>>> I’m trying to check for the existence of a global called process. In JS,
>>> you’d generally do that by checking typeof process == ‘undefined’. Falcon
>>> does not allow you to do that and complains that process is an undefined
>>> property. In the browser you can use window[“process”] == undefined and in
>>> node you can (theoretically) use global[“process”] == undefined. I can’t
>>> think of a generic way to do this though.
>>> 
>>> Thoughts?
>>> Harbs
> 



Re: [FlexJS] Use of typeof

2017-07-04 Thread Harbs
Actually, I see that the Node typedefs has all the process declarations in 
global.js.

Is there an issue with adding a dependency in CoreJS to node.swc?

Should a class that has this dependency go somewhere else? (I don’t really see 
an issue with adding the dependency, but I’m throwing this out in case I’m 
missing something.)

Harbs

> On Jul 5, 2017, at 12:00 AM, Harbs  wrote:
> 
> Looks like it.
> 
> I see this in missing.js:
> 
> /**
> * @export
> * This gets mapped to org.apache.flex.utils.Language.trace() by the compiler
> * @param {...} rest
> */
> function trace(rest) {}
> 
> /**
> * @type {!Console}
> * @const
> */
> var console;
> 
> 
> I guess I can add another one like so:
> 
> /**
> * @type {!Process}
> * @const
> */
> var process;
> 
> However, it seems like a drag to have to add a typedef every time a developer 
> needs to check for the existence of a global that we did not think of.
> 
>> On Jul 4, 2017, at 9:13 PM, Harbs  wrote:
>> 
>> Thanks. Here’s what I see:
>> 
>> if(typeof window !== "undefined")
>> {
>>  theConsole = window.console;
>> }
>> else if(typeof console !== "undefined")
>> {
>>  theConsole = console;
>> }
>> 
>> Did you define console in a typedef maybe?
>> 
>> I’m thinking that Falcon should really allow undefined variables when used 
>> with “typeof”.
>> 
>> Truth be told, I really need to do something like one of these:
>> if(typeof (process) != 'undefined' && {}.toString.call(process) == '[object 
>> process]’)
>> or:
>> if(typeof process != 'undefined' && process && process.constructor.name == 
>> "process”)
>> 
>> Of course every reference to process causes a compiler error. I wonder if 
>> there’s some way to tell the compiler to accept it without complaining…
>> 
>>> On Jul 4, 2017, at 8:54 PM, Josh Tynjala  wrote:
>>> 
>>> I don't remember exactly what I did, but in order to get trace() working in
>>> Node.js, I had to figure out how to find the console object on window
>>> versus global. I feel like I remember using typeof, but maybe it was
>>> something else. Take a look at the implementation of Language.trace() to
>>> see what I did.
>>> 
>>> - Josh
>>> 
>>> On Jul 4, 2017 5:26 AM, "Harbs"  wrote:
>>> 
>>>> I’m trying to figure out how to solve this dilemma:
>>>> 
>>>> Browsers attach global variables to window.
>>>> 
>>>> Node.js attaches globals to global.
>>>> 
>>>> I’m trying to check for the existence of a global called process. In JS,
>>>> you’d generally do that by checking typeof process == ‘undefined’. Falcon
>>>> does not allow you to do that and complains that process is an undefined
>>>> property. In the browser you can use window[“process”] == undefined and in
>>>> node you can (theoretically) use global[“process”] == undefined. I can’t
>>>> think of a generic way to do this though.
>>>> 
>>>> Thoughts?
>>>> Harbs
>> 
> 



Re: [FlexJS] Mobile Depends on Flash 11.4?

2017-07-04 Thread Harbs
Where is that from?

In build.properties I see this:

# flex-sdk-description values
release.name = Apache Flex (FlexJS)
# this is the version that appears in the flex-sdk-description  tag
# and on the package name.  This is the publicly known version of FlexJS
release.version = 0.9.0

# fb.release.version must start with 4 in order for FB to accept it.
# intellij seems to want it to be at least 4.6 in order to not use certain
# older plugins that have incompatible Java APIs.  We might as well keep
# the major/minor current with the version of FDB we are borrowing from
# the flex-sdk
# this property should only go in flex-sdk-description.xml  tag
fb.release.version = 4.14.1

# override on command line with -Dbuild.number=999 or in local.properties
build.number = 0

# Flash player version for which player global swc to use
playerglobal.version = 11.1

# AIR version number
air.version = 14.0

> On Jul 5, 2017, at 9:19 AM, Alex Harui  wrote:
> 
> Which build?  The Ant build is set for
> 
> 
>
> 
> -Alex
> 
> On 7/4/17, 12:14 AM, "yishayw"  > wrote:
> 
>> I was having a problem building the Mobile package. It was complaining
>> about
>> line 151 in Camera.as which does camera.copyToByteArray(). Looking at the
>> docs [1], it looks like this method became available in flash 11.4 while
>> the
>> build is set to look for flash player 11.1 (under build.properties).
>> 
>> So I changed to flash 25.0 and rebuilt, and Mobile passed. The funny thing
>> is that after changing back to 11.1, the build now passes.
>> 
>> In short, it looks to me like the flash player requirement should be
>> updated
>> to 11.4.
>> 
>> What do you guys think?
>> 
>> [1]
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhelp.adobe 
>> 
>> .com%2Fen_US%2FFlashPlatform%2Freference%2Factionscript%2F3%2Fflash%2Fmedi
>> a%2FCamera.html%23copyToByteArray&data=02%7C01%7C%7C9957eba96c8347ef190108
>> d4c2aee848%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636347503858534935
>> &sdata=t2FKQyYZBDQzz1E4L6FVOGYTZObeTGuBx3xIMI%2FfXUk%3D&reserved=0()
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle 
>> 
>> x-development.247.n4.nabble.com 
>> %2FFlexJS-Mobile-Depends-on-Flash-11-4-
>> tp62811.html&data=02%7C01%7C%7C9957eba96c8347ef190108d4c2aee848%7Cfa7b1b5a
>> 7b34438794aed2c178decee1%7C0%7C0%7C636347503858534935&sdata=%2BRDJB%2BVoJU
>> AqIl1xxh6fniXZ4A5whl%2FFovxyZaaztfg%3D&reserved=0
>> Sent from the Apache Flex Development mailing list archive at Nabble.com 
>> .



Re: [FlexJS] Use of typeof

2017-07-05 Thread Harbs
No. I was trying to use process to check whether it’s running in a Node runtime 
(such as Node or Electron). window does not have process.

I’m trying to add a class that lets the client know what environment it’s 
running in.

Adding global sounds like a good idea. Between window and global, I think that 
would offer a solution everywhere.

> On Jul 5, 2017, at 7:48 PM, Alex Harui  wrote:
> 
> Sure, I know it wouldn't work at runtime, but it sounded like Harbs
> couldn't even get the compiler to accept window["process"] which it should.
> 
> So, it should be ok to write:
> 
> if(typeof window !== "undefined")
> {
>theProcess = window["process"];
> }
> else
> 
>theProcess = global.process
> 
> But is there really a process property in the browser?
> 
> We could create or own single variable if we want.  How often do libraries
> need stuff in window/global?  Classes that need it should be able to use
> inject_html and run some JS that maps window to global or the other way
> around.
> 
> HTH,
> -Alex
> 
> On 7/5/17, 6:43 AM, "Josh Tynjala"  wrote:
> 
>> Node.js doesn't have a window variable, so window["process"] won't work.
>> They have a global variable instead.
>> 
>> I remember reading that there is a proposal for ECMAScript to standardize
>> a
>> single variable that refers to window in the browser and global in
>> Node.js,
>> but that doesn't exist yet.
>> 
>> - Josh
>> 
>> On Tue, Jul 4, 2017 at 11:35 PM, Alex Harui 
>> wrote:
>> 
>>> What class in Core needs this dependency?  I think one drawback is that
>>> users of that class will need to add node.swc to their project
>>> dependencies.  But I don't think every consumer of Core will need
>>> node.swc.
>>> 
>>> But first, why didn't window["process"] work?  In theory Falcon will let
>>> you access anything off of window.  We could also add global if we want.
>>> Or maybe we should only allow global and have some bootstrap code that
>>> maps global to window?
>>> 
>>> -Alex
>>> 
>>> On 7/4/17, 2:09 PM, "Harbs"  wrote:
>>> 
>>>> Actually, I see that the Node typedefs has all the process declarations
>>>> in global.js.
>>>> 
>>>> Is there an issue with adding a dependency in CoreJS to node.swc?
>>>> 
>>>> Should a class that has this dependency go somewhere else? (I don’t
>>>> really see an issue with adding the dependency, but I’m throwing this
>>> out
>>>> in case I’m missing something.)
>>>> 
>>>> Harbs
>>>> 
>>>>> On Jul 5, 2017, at 12:00 AM, Harbs  wrote:
>>>>> 
>>>>> Looks like it.
>>>>> 
>>>>> I see this in missing.js:
>>>>> 
>>>>> /**
>>>>> * @export
>>>>> * This gets mapped to org.apache.flex.utils.Language.trace() by the
>>>>> compiler
>>>>> * @param {...} rest
>>>>> */
>>>>> function trace(rest) {}
>>>>> 
>>>>> /**
>>>>> * @type {!Console}
>>>>> * @const
>>>>> */
>>>>> var console;
>>>>> 
>>>>> 
>>>>> I guess I can add another one like so:
>>>>> 
>>>>> /**
>>>>> * @type {!Process}
>>>>> * @const
>>>>> */
>>>>> var process;
>>>>> 
>>>>> However, it seems like a drag to have to add a typedef every time a
>>>>> developer needs to check for the existence of a global that we did not
>>>>> think of.
>>>>> 
>>>>>> On Jul 4, 2017, at 9:13 PM, Harbs  wrote:
>>>>>> 
>>>>>> Thanks. Here’s what I see:
>>>>>> 
>>>>>> if(typeof window !== "undefined")
>>>>>> {
>>>>>>theConsole = window.console;
>>>>>> }
>>>>>> else if(typeof console !== "undefined")
>>>>>> {
>>>>>>theConsole = console;
>>>>>> }
>>>>>> 
>>>>>> Did you define console in a typedef maybe?
>>>>>> 
>>>>>> I’m thinking that Falcon should really allow undefined variables
>>> when
>>>>>> used with “typeof”.
>>>>>&g

Re: [FlexJS] technical debt

2017-07-06 Thread Harbs
A large percentage of the complaints are inaccurate. The reason the technical 
debt increased is largely because of the new TLF code.

Who made these rules and how do we change them? We can make it look much better 
by just changing some of the rules…

Harbs

> On Jul 6, 2017, at 2:24 AM, Justin Mclean  wrote:
> 
> Hi,
> 
> If you take a look at this [1] you see that technical debt increased a bit 
> between the 0.8 and 0.9 releases. It would be good if we could reduce this.
> 
> While Sonar cube isn’t perfect, probably needs some tuning, and there are a 
> number of false positives in there it is trying to tell us something.
> 
> Thanks,
> Justin
> 
> 1. https://builds.apache.org/analysis/overview?id=20942



Re: [FlexJS] 0.8.0 not working in IntelliJ IDEA

2017-07-06 Thread Harbs
VS Code is reporting all kinds of issues that are not problems since the switch 
to dual. Maybe that’s related as well?

> On Jul 6, 2017, at 9:06 PM, Josh Tynjala  wrote:
> 
> I don't see why -targets wouldn't work when it works elsewhere, but I just
> tried -compiler.targets too, and that also failed.
> 
> Looking at the source code for flex2.tools.MxmlJSC, I see that it's still
> checking for the -js-output-type option, and it isn't trying to find
> -targets at all. Did you forget to update this class to support the dual
> changes?
> 
> - Josh
> 
> On Thu, Jul 6, 2017 at 10:44 AM, Alex Harui 
> wrote:
> 
>> What does IJ do with additional compiler options?  Does it put them in one
>> of the .xml files?  I can see from the original post that IJ seems to be
>> using:
>> 
>> -load-config=/Users/joshtynjala/Library/Caches/
>> IntelliJIdea2017.1/compile-s
>> erver/helloidea_6d5abd99/_temp_/IntelliJ_IDEA/idea-B028A5AE-12E86E20.xml
>> -load-config+=/Users/joshtynjala/Development/Flex/
>> sdks/flexjs-0.8.0/ide/IDE
>> A/intellij-config.xml
>> 
>> 
>> Did the new output log of compiler options reflect that it recognized that
>> option?  Also, I'm not sure that -targets will work, it might have to be
>> -compiler.targets
>> 
>> HTH,
>> -Alex
>> 
>> On 7/6/17, 9:23 AM, "Josh Tynjala"  wrote:
>> 
>>> I tried specifying -targets=JSFlex in the additional compiler options, but
>>> it made no difference.
>>> 
>>> - Josh
>>> 
>>> On Thu, Jul 6, 2017 at 9:09 AM, Alex Harui 
>>> wrote:
>>> 
 I suspect the issue is that IJ dictates all of the settings and doesn't
 use flex-config.xml, and thus no targets are being specified.  Is there
 a
 way to specify compiler.targets in additional compiler options in IJ?
 There is in FB.
 
 -Alex
 
 On 7/6/17, 8:34 AM, "Josh Tynjala"  wrote:
 
> While full support for FlexJS in IntelliJ IDEA would be great, I think
> it's
> critical that we fix this issue to at least get back to the baseline we
> had
> in 0.7. A FlexJS project required a little bit of extra configuration
 with
> 0.7, but at least we could get the compiler to work inside IntellIJ.
> 
> Many Flex/ActionScript developers use IntelliJ, and while I'd love to
> encourage them to try VSCode, I think many prefer to take their first
> steps
> with FlexJS in an environment they already know. Having this stop
 working
> (especially when there are tutorials out there claiming it works) is
 going
> to turn people away.
> 
> If we can fix this issue, I want to push a 0.8.1 update because I think
> getting this working again is very, very important.
> 
> - Josh
> 
> On Thu, Jul 6, 2017 at 12:55 AM, piotrz 
 wrote:
> 
>> As I remember Chris get to the bottom of it and resolved it.
>> Unfortunately
>> after contacting with Jetbrains they refuse accept pull request with
 fix
>> and
>> Chris dropped it. [1]
>> 
>> I was thinking even then that if someone could fix it and store
 version
>> of
>> plugin somewhere with fix it would be also HUGE, cause we could gain
>> another
>> IDE which support FlexJS.
>> 
>> [1]
>> 
>> https://na01.safelinks.protection.outlook.com/?url=
 http%3A%2F%2Fapache-fl
>> ex-development.247.n4.nabble&data=02%7C01%7C%
 7C5f4eb274ee54460f044608
>> d4c484a74e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
 7C63634952143892612
>> 4&sdata=3U%2FcqwvO4C8OtATk9khadreh99KxUUfsfJYiEptjJzs%3D&reserved=0.
>> com/FlexJS-Step-by-step-h-baby-td58710.html
>> 
>> Thanks,
>> Piotr
>> 
>> 
>> 
>> -
>> Apache Flex PMC
>> piotrzarzyck...@gmail.com
>> --
>> View this message in context: http://apache-flex-
>> development.247.n4.nabble.com/FlexJS-0-8-0-not-working-
>> in-IntelliJ-IDEA-tp62848p62862.html
>> Sent from the Apache Flex Development mailing list archive at
>> Nabble.com.
>> 
 
 
>> 
>> 



Re: [FlexJS] technical debt

2017-07-06 Thread Harbs
Yup.

For example: I’d say an extremely large percentage of the “technical debt” in 
TLF is there for a reason. Do NOT “fix” any of that…

> On Jul 6, 2017, at 11:53 PM, Alex Harui  wrote:
> 
> But IMO, for right now, if "it ain't broke, don't fix it".



FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-06 Thread Harbs
Where are the instructions on how to use it? If I know how to write tests, I’d 
be much better about doing so…

> On Jul 6, 2017, at 11:53 PM, Alex Harui  wrote:
> 
> I have put in place a test infrastructure



[FlexJS][VS Code] dual issues

2017-07-06 Thread Harbs
Since updating to “dual”has been reporting lots of errors. When I build, both 
the debug and release builds build correctly, but the PROBLEMS window and the 
live code hinting report lots of (non) issues. I’m not sure what the source of 
the errors are, but here are the details:

I’ve tried a few variations of the asconfig file, but here’s what I currently 
have:
{
"config": "flex",
"compilerOptions": {
"debug": true,
"js-output-type": "flexjs",
"targets": ["JSFlex"],
"source-map": false,
"library-path": [
"lib"
],
"external-library-path": [
"typedefs"
]
},
"copySourcePathAssets": true,
"additionalOptions": "-remove-circulars 
-js-output-optimization=skipAsCoercions 
-html-template=src/resources/mdl-js-index-template.html 
-js-external-library-path+=typedefs -js-library-path+=lib",
"files":
[
"src/PortedPrintUI.mxml"
]
}

The js-output-type, library-path and external-library-path options are probably 
not needed, but they don’t seem to adversely effect the builds. (It would be 
nice to have full support for the new compiler options.)

Problems:
1. I’m getting “problems” even for files which are not used in my project and 
are not open.
2. I’m getting lots of errors which are specific to SWF-only output:
  a. I’m not getting JS specific classes recognized.
  b. I’m getting lots of incompatible overrides (to Flash methods)
  c. I’m getting overriding function not marked for override errors on 
functions that are implemented in flash (i.e. public function get 
scaleX():Number)
  d. conflicts between variables and Flash getters.
  e. etc...

Thanks,
Harbs

Re: [FlexJS] technical debt

2017-07-07 Thread Harbs
Considering you did not answer the most significant part of my question. I’m 
asking it again.

> On Jul 6, 2017, at 9:13 PM, Harbs  wrote:
> 
> and how do we change them?



Re: [FlexJS] technical debt

2017-07-07 Thread Harbs
I don’t see any options like that (logged in using my Apache account). Does 
someone need to add permissions?

> On Jul 7, 2017, at 10:49 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>>> and how do we change them?
> 
> In the sonar cube web interface (same url as before) under rules/quality 
> profile. It's best to set up a new quality profile rather than edit the 
> existing one as that may effect other projects.
> 
> I’ll put together a wiki page on making the rules more in the style of the 
> SDK and we’ll go from there.
> 
> Thanks,
> Justin
> 



Re: [FlexJS][VS Code] dual issues

2017-07-07 Thread Harbs
Sounds great! Looking forward!

Harbs

> On Jul 7, 2017, at 2:12 AM, Josh Tynjala  wrote:
> 
> Okay, I figured out how to make VSCode switch to JS APIs instead of SWF
> APIs for completion and things. In the next version of the extension, when
> the targets compiler option is specified in asconfig.json, and the first
> value isn't "SWF", the extension will offer JS APIs. That includes giving
> you access to native browser APIs instead of Flash Player APIs. That's
> going to be a really nice change, I think. Thanks for pointing out this
> issue!
> 
> - Josh
> 
> On Thu, Jul 6, 2017 at 2:35 PM, Josh Tynjala  wrote:
> 
>>> The js-output-type, library-path and external-library-path options are
>> probably not needed
>> 
>> I would get rid of -js-output-type. I assume that -targets takes
>> precedence, but just to be safe, you shouldn't use both. -js-output-type is
>> necessary for 0.7.0, but switch entirely to -targets with 0.8.0.
>> 
>>> It would be nice to have full support for the new compiler options
>> 
>> html-template, html-output-filename, js-compiler-option,
>> js-external-library-path, js-library-path, swf-external-library-path,
>> swf-library-path, and remove-circulars should all work in the
>> compilerOptions field if you're using the latest vscode-nextgenas 0.4.4 and
>> asconfigc 0.5.1. I just updated asconfigc to support these options last
>> week, and I haven't made an official announcement yet, so you might have
>> missed that one.
>> 
>> I think there may be one or two you'll still need to put into
>> additionalOptions, but you should be able to switch over most of them.
>> 
>>> 1. I’m getting “problems” even for files which are not used in my
>> project and are not open.
>> 
>> This is something I'm aware of in VSCode. The compiler seems to greedily
>> load everything that exists in a source path, even if you don't actually
>> use it. Personally I like this, but even if I were to make it an option
>> somehow, I'm not aware of a way to stop the compiler from working that way
>> either.
>> 
>>> 2. I’m getting lots of errors which are specific to SWF-only output:
>> 
>> I just glanced through the part of VSCode that passes options to the
>> compiler for code intelligence (different from the way that asconfigc runs
>> the compiler to build), and I don't think I'm actually using the value of
>> -targets. It's probably defaulting to SWF. I'll play around with that to
>> see if I can improve things when -targets is specifically JSFlex.
>> 
>>>  a. I’m not getting JS specific classes recognized.
>> 
>> Just to be clear, are you referring to DOM classes like HTMLButtonElement
>> and other browser APIs here? I just want to be sure so that I test the
>> right thing when I make changes.
>> 
>> - Josh
>> 
>> On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:
>> 
>>> Since updating to “dual”has been reporting lots of errors. When I build,
>>> both the debug and release builds build correctly, but the PROBLEMS window
>>> and the live code hinting report lots of (non) issues. I’m not sure what
>>> the source of the errors are, but here are the details:
>>> 
>>> I’ve tried a few variations of the asconfig file, but here’s what I
>>> currently have:
>>> {
>>>"config": "flex",
>>>"compilerOptions": {
>>>"debug": true,
>>>"js-output-type": "flexjs",
>>>"targets": ["JSFlex"],
>>>"source-map": false,
>>>"library-path": [
>>>"lib"
>>>],
>>>"external-library-path": [
>>>"typedefs"
>>>]
>>>},
>>>"copySourcePathAssets": true,
>>>"additionalOptions": "-remove-circulars 
>>> -js-output-optimization=skipAsCoercions
>>> -html-template=src/resources/mdl-js-index-template.html
>>> -js-external-library-path+=typedefs -js-library-path+=lib",
>>>"files":
>>>[
>>>"src/PortedPrintUI.mxml"
>>>]
>>> }
>>> 
>>> The js-output-type, library-path and external-library-path options are
>>> probably not needed, but they don’t seem to adversely effect the builds.
>>> (It would be nice to have full support for the new compiler options.)
>>> 
>>> Problems:
>>> 1. I’m getting “problems” even for files which are not used in my project
>>> and are not open.
>>> 2. I’m getting lots of errors which are specific to SWF-only output:
>>>  a. I’m not getting JS specific classes recognized.
>>>  b. I’m getting lots of incompatible overrides (to Flash methods)
>>>  c. I’m getting overriding function not marked for override errors on
>>> functions that are implemented in flash (i.e. public function get
>>> scaleX():Number)
>>>  d. conflicts between variables and Flash getters.
>>>  e. etc...
>>> 
>>> Thanks,
>>> Harbs
>> 
>> 
>> 



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Harbs
The checkintests target currently fails. I’m guessing the build file was not 
updated for dual.

Selenium has a JS API[1]. It seems like we should be able to write tests in 
MXML and AS and then use Node.js to run the results. I’m not sure how easy it 
would be to generalize tests so that the same tests could be run in both Flash 
and Selenium. It should be an interesting project to try.

We should probably add FlexUnit tests even if they only run in SWF. I will make 
an attempt to do so myself. It seems like it should be possible to run the 
FlexUnit tests in JS using one of the JS unit testing frameworks or even 
rolling our own JS implementation. I don’t think the way it’s run is important, 
but it would be a very good idea to allow FlexUnit to run in JS unmodified.

I never quite “got” how the meta tags in FlexUnit actually work.

[1]https://www.npmjs.com/package/selenium-webdriver 
<https://www.npmjs.com/package/selenium-webdriver>

> On Jul 7, 2017, at 1:38 AM, Alex Harui  wrote:
> 
> I have a subset of Mustella working on both platforms in the BasicTests
> that run from the checkintests target in the Ant build.  There is a
> writeup on Mustella in the wiki
> https://cwiki.apache.org/confluence/display/FLEX/Mustella+Overview.  I
> haven't gone through it to see how much does or doesn't apply to FlexJS.
> The BasicTests are in the flex-asjs repo in mustella/tests/basicTests.  I
> basically copied the Flex SDK's BasicTests and modified it a bit to run in
> FlexJS and commented out most tests because back when I did it, we didn't
> have many components.  It might be interesting to comment more tests back
> in and see if they run.
> 
> There are some FlexUnit tests that run as part of the Core.swc Ant build,
> but only on SWF.
> 
> The Maven build runs some Selenium tests that I think are written in Java,
> and I think only test JS output.
> 
> I haven't invested much time in test infrastructure or test creation since
> there were some strong opinions about not liking Mustella and some
> thoughts about how to make FlexUnit run on both platforms.
> 
> My personal preference is that tests should be written in MXML and/or AS
> and run on both platforms.  Bonus points if existing tests can be run
> unmodified or mostly unmodified.
> 
> -Alex
> 
> On 7/6/17, 2:02 PM, "Harbs"  wrote:
> 
>> Where are the instructions on how to use it? If I know how to write
>> tests, I’d be much better about doing so…
>> 
>>> On Jul 6, 2017, at 11:53 PM, Alex Harui 
>>> wrote:
>>> 
>>> I have put in place a test infrastructure
>> 
> 



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Harbs
https://paste.apache.org/Gcuj <https://paste.apache.org/Gcuj>

> On Jul 7, 2017, at 6:55 PM, Alex Harui  wrote:
> 
> What error did you get?
> 
> The Ant build on the CI server runs checkintests and it is passing there.
> 
> The FlexJS Mustella uses Selenium for the JS run, but some manual
> intervention is currently required.
> 
> -Alex
> 
> On 7/7/17, 3:16 AM, "Harbs"  wrote:
> 
>> The checkintests target currently fails. I’m guessing the build file was
>> not updated for dual.
>> 
>> Selenium has a JS API[1]. It seems like we should be able to write tests
>> in MXML and AS and then use Node.js to run the results. I’m not sure how
>> easy it would be to generalize tests so that the same tests could be run
>> in both Flash and Selenium. It should be an interesting project to try.
>> 
>> We should probably add FlexUnit tests even if they only run in SWF. I
>> will make an attempt to do so myself. It seems like it should be possible
>> to run the FlexUnit tests in JS using one of the JS unit testing
>> frameworks or even rolling our own JS implementation. I don’t think the
>> way it’s run is important, but it would be a very good idea to allow
>> FlexUnit to run in JS unmodified.
>> 
>> I never quite “got” how the meta tags in FlexUnit actually work.
>> 
>> [1]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.np
>> mjs.com%2Fpackage%2Fselenium-webdriver&data=02%7C01%7C%7C5851203659274db5f
>> ae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363501941932
>> 82017&sdata=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D&reserved=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmj
>> s.com%2Fpackage%2Fselenium-webdriver&data=02%7C01%7C%7C5851203659274db5fae
>> 608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636350194193282
>> 017&sdata=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D&reserved=0>
>> 
>>> On Jul 7, 2017, at 1:38 AM, Alex Harui  wrote:
>>> 
>>> I have a subset of Mustella working on both platforms in the BasicTests
>>> that run from the checkintests target in the Ant build.  There is a
>>> writeup on Mustella in the wiki
>>> 
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.ap
>>> ache.org%2Fconfluence%2Fdisplay%2FFLEX%2FMustella%2BOverview&data=02%7C01
>>> %7C%7C5851203659274db5fae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1
>>> %7C0%7C0%7C636350194193282017&sdata=0Pnb%2BdCvmgY9UVKOj4lELhkNa3VJBKnrgOA
>>> WnOy2cvc%3D&reserved=0.  I
>>> haven't gone through it to see how much does or doesn't apply to FlexJS.
>>> The BasicTests are in the flex-asjs repo in mustella/tests/basicTests.
>>> I
>>> basically copied the Flex SDK's BasicTests and modified it a bit to run
>>> in
>>> FlexJS and commented out most tests because back when I did it, we
>>> didn't
>>> have many components.  It might be interesting to comment more tests
>>> back
>>> in and see if they run.
>>> 
>>> There are some FlexUnit tests that run as part of the Core.swc Ant
>>> build,
>>> but only on SWF.
>>> 
>>> The Maven build runs some Selenium tests that I think are written in
>>> Java,
>>> and I think only test JS output.
>>> 
>>> I haven't invested much time in test infrastructure or test creation
>>> since
>>> there were some strong opinions about not liking Mustella and some
>>> thoughts about how to make FlexUnit run on both platforms.
>>> 
>>> My personal preference is that tests should be written in MXML and/or AS
>>> and run on both platforms.  Bonus points if existing tests can be run
>>> unmodified or mostly unmodified.
>>> 
>>> -Alex
>>> 
>>> On 7/6/17, 2:02 PM, "Harbs"  wrote:
>>> 
>>>> Where are the instructions on how to use it? If I know how to write
>>>> tests, I’d be much better about doing so…
>>>> 
>>>>> On Jul 6, 2017, at 11:53 PM, Alex Harui 
>>>>> wrote:
>>>>> 
>>>>> I have put in place a test infrastructure
>>>> 
>>> 
>> 
> 



Re: [FlexJS] technical debt

2017-07-08 Thread Harbs
I’m just catching up on email.

I made two changes on Friday. I deactivated the following two rules for the 
Flex language. (Please note that I only deactivated them. I did not delete 
them.) I wanted to see how much that would effect the score:
"===" and "!==" should be used instead of "==" and "!=“
and
"public static" fields should be constant

There are others that would be interesting to see how they effect the score as 
well.

It’s important to note that these changes were only to the “Flex” language. 
Considering that we’re the only project using this language at all, it does not 
effect anyone else. Additionally, as best as I can tell, the language was first 
defined in the end of December. Considering we “own” the language, it seems 
reasonable that we should define sane defaults in case any other project DOES 
use the language.

"===" and "!==" should be used instead of "==" and "!=“ is simply incorrect for 
ActionScript. I flies in the face of accepted coding practices for the 
language, and should be removed completely. It causes thousands of complaints.

"public static" fields should be constant is not something that Flex ever 
enforced. I don’t really see the value for this rule, but I could go either way.

There are some other rules which should be discussed, but we can do that on the 
wiki.

Feel free to revert my changes, but the discussion should be about defaults for 
the language, and not just about a custom rule set.

Thanks,
Harbs

> On Jul 8, 2017, at 6:41 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> Before you accuse anyone (even if you expressed doubt) do you have a way to 
>> determine who made the change to the Sonar Cube configuration?
> 
> I can’t see anything in the interface no, but the changes are logged and 
> infra will be able to tell. If it wasn’t him I’ll appoligise.
> 
> Thanks,
> Justin



Re: [FlexJS] Use of typeof

2017-07-09 Thread Harbs
Checking for window will work for Node, but it will not work for Electron.

I tried adding global to Falcon, but I was obviously going about it wrong, 
because what I tried did not work.

This is not really high priority for me right now, so I’m moving on to 
something else…

> On Jul 6, 2017, at 3:05 AM, Alex Harui  wrote:
> 
> I've noticed lots of advice on the internet to use feature detection
> instead of browser/runtime detection.  Did you rule out doing that?
> Browsers may implement new features over time.
> 
> But otherwise, I see some clever tests that check for "window" and a few
> other things.
> 
> HTH,
> -Alex
> 
> On 7/5/17, 1:54 PM, "Harbs"  wrote:
> 
>> No. I was trying to use process to check whether it’s running in a Node
>> runtime (such as Node or Electron). window does not have process.
>> 
>> I’m trying to add a class that lets the client know what environment it’s
>> running in.
>> 
>> Adding global sounds like a good idea. Between window and global, I think
>> that would offer a solution everywhere.
>> 
>>> On Jul 5, 2017, at 7:48 PM, Alex Harui  wrote:
>>> 
>>> Sure, I know it wouldn't work at runtime, but it sounded like Harbs
>>> couldn't even get the compiler to accept window["process"] which it
>>> should.
>>> 
>>> So, it should be ok to write:
>>> 
>>> if(typeof window !== "undefined")
>>> {
>>>   theProcess = window["process"];
>>> }
>>> else
>>> 
>>>   theProcess = global.process
>>> 
>>> But is there really a process property in the browser?
>>> 
>>> We could create or own single variable if we want.  How often do
>>> libraries
>>> need stuff in window/global?  Classes that need it should be able to use
>>> inject_html and run some JS that maps window to global or the other way
>>> around.
>>> 
>>> HTH,
>>> -Alex
>>> 
>>> On 7/5/17, 6:43 AM, "Josh Tynjala"  wrote:
>>> 
>>>> Node.js doesn't have a window variable, so window["process"] won't
>>>> work.
>>>> They have a global variable instead.
>>>> 
>>>> I remember reading that there is a proposal for ECMAScript to
>>>> standardize
>>>> a
>>>> single variable that refers to window in the browser and global in
>>>> Node.js,
>>>> but that doesn't exist yet.
>>>> 
>>>> - Josh
>>>> 
>>>> On Tue, Jul 4, 2017 at 11:35 PM, Alex Harui 
>>>> wrote:
>>>> 
>>>>> What class in Core needs this dependency?  I think one drawback is
>>>>> that
>>>>> users of that class will need to add node.swc to their project
>>>>> dependencies.  But I don't think every consumer of Core will need
>>>>> node.swc.
>>>>> 
>>>>> But first, why didn't window["process"] work?  In theory Falcon will
>>>>> let
>>>>> you access anything off of window.  We could also add global if we
>>>>> want.
>>>>> Or maybe we should only allow global and have some bootstrap code that
>>>>> maps global to window?
>>>>> 
>>>>> -Alex
>>>>> 
>>>>> On 7/4/17, 2:09 PM, "Harbs"  wrote:
>>>>> 
>>>>>> Actually, I see that the Node typedefs has all the process
>>>>>> declarations
>>>>>> in global.js.
>>>>>> 
>>>>>> Is there an issue with adding a dependency in CoreJS to node.swc?
>>>>>> 
>>>>>> Should a class that has this dependency go somewhere else? (I don’t
>>>>>> really see an issue with adding the dependency, but I’m throwing this
>>>>> out
>>>>>> in case I’m missing something.)
>>>>>> 
>>>>>> Harbs
>>>>>> 
>>>>>>> On Jul 5, 2017, at 12:00 AM, Harbs  wrote:
>>>>>>> 
>>>>>>> Looks like it.
>>>>>>> 
>>>>>>> I see this in missing.js:
>>>>>>> 
>>>>>>> /**
>>>>>>> * @export
>>>>>>> * This gets mapped to org.apache.flex.utils.Language.trace() by the
>>>>>>> compiler
>>>>>>> * @param {...} rest
>>>>>

Re: [FlexJS] technical debt

2017-07-09 Thread Harbs

> On Jul 9, 2017, at 11:53 AM, Justin Mclean  wrote:
> 
>> O really! - There are other projects which using AS3 in Apache? Could you
>> send a links?
> 
> Off top of my head MyFaces, Thrift and a couple of others. Maxim works on one 
> of them but I think they may of moved to a JS front end. None that I know use 
> AS as the main language but given the 300+ projects including incubating ones 
> it’s often hard to know everything that is going on. 

It’s actually quite easy.[1]

The only project other than Flex which is listed as using ActionScript is 
Thrift. You can see the source code here.[2]

As you can see on the SonarQube dashboard[3], there are a total of 21 projects 
using SonarQube. 5 of those are Flex projects. Of the remaining 16 projects, 
it’s very easy to see that none of them are using the Flex language.

Thanks,
Harbs

[1]https://projects.apache.org/projects.html?language#ActionScript 
<https://projects.apache.org/projects.html?language#ActionScript>
[2]https://github.com/apache/thrift/tree/master/lib/as3/src/org/apache/thrift 
<https://github.com/apache/thrift/tree/master/lib/as3/src/org/apache/thrift>
[3]https://builds.apache.org/analysis/dashboard/index 
<https://builds.apache.org/analysis/dashboard/index>

Re: [FlexJS] technical debt

2017-07-09 Thread Harbs
Actually I did not miss that.

The Flex code is an external project:
https://code.google.com/archive/p/jsf-flex/ 
<https://code.google.com/archive/p/jsf-flex/>

I’ll be happy to communicate.

Thanks,
Harbs

> On Jul 9, 2017, at 1:39 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> Of the remaining 16 projects, it’s very easy to see that none of them are 
>> using the Flex language.
> 
> 
> The first link relies on projects meta data and may not be accurate. None of 
> the links you provide show what profile(s) the projects use.
> 
> You missed that MyFaces uses Sonar Type and it contains Flex code [1] but it 
> looks like their sonar project only uses the Java profile.
> 
> Please just take a little more care next time and communicate on list before 
> you make any changes.
> 
> Thanks,
> Justin
> 
> 1. https://wiki.apache.org/myfaces/JSF_Flex



[FlexJS]DropDownList dataProvider

2017-07-09 Thread Harbs
If you set the dataProvider of a DropDownList using binding and the Bindable 
value is not initialized when it’s declared, it causes a runtime error.

I’m trying to decide whether this is a bug, or it’s a cost of PAYG (where in 
the basic implementation you are rrequired to initialize the value). I leaning 
to classifying it as a bug because it seems like having a requirement that the 
bindable property should be initialized is overly stringent.

Thoughts?
Harbs

  1   2   3   4   5   6   7   8   9   10   >