Re: [FlexJS XML] for each

2017-07-17 Thread Justin Mclean
Hi, > We might keep around a Language class for things "every" app will need > (is/as, maybe some coercions). But trace, sortOn, Vector should be PAYG. Currently the SDK itself uses trace (including in a few core classes [1]) so unless they are removed it's likely you end up with the code for

Re: [FlexJS] technical debt

2017-07-17 Thread Justin Mclean
Hi, So more than a week has gone by and I’ve received little feedback on [1]. Given that I’ll gone ahead and implement the rules as discussed in the document so people can see the changes. The new results are up: - First off the header rules is overly strict and expects a copyright line not

RE: [FlexJS] findPopupHost issue

2017-07-17 Thread Yishay Weiss
Even if the Application instance isn’t an IPopUpHost the method will just return null, so the effect is the same as just doing (appInstance as IPopUpHost). I suspect the method is being misused rather than there being a problem with the method. From: Alex Harui

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
We might keep around a Language class for things "every" app will need (is/as, maybe some coercions). But trace, sortOn, Vector should be PAYG. -Alex On 7/17/17, 10:20 PM, "Harbs" wrote: >Another reason to not add to Language is that it would make Language >depend on

Re: [01/10] git commit: [flex-asjs] [refs/heads/refactor-strand] - Core changes to IStrand

2017-07-17 Thread Harbs
Not surprised. I still have quite a bit to do before I’d expect it to build. > On Jul 18, 2017, at 7:20 AM, piotrz wrote: > > Hi Harbs, > > I've created pipelines for your strand-work branch. Just run the build and > it failed [1]. > > [1] >

Re: [FlexJS] findPopupHost issue

2017-07-17 Thread Alex Harui
FWIW, it may not be safe to assume that Application will always be an IPopUpHost, hence the utility function. Thanks, -Alex On 7/17/17, 9:59 PM, "piotrz" wrote: >Hi Yishay, > >That's a good point - Application is itself an IPopupHost. I've asked him >what is the use

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
Another reason to not add to Language is that it would make Language depend on XML. I’ll try to write these functions today. I don’t mind breaking up utility classes, but the Language class will need changes to the compiler. It looks like it’s more than just replacing

RE: [FlexJS] findPopupHost issue

2017-07-17 Thread piotrz
Hi Yishay, That's a good point - Application is itself an IPopupHost. I've asked him what is the use case for his host popup search. Thanks, Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context:

RE: [FlexJS] findPopupHost issue

2017-07-17 Thread Yishay Weiss
I think there’s confusion over what a popup host is. A popup host is where you would add an IPopUp. UIUtils.findPopUpHost(myComp as IUIBase) finds the closest ancestor for myComp to which a popup can be added. These lines from ComboBoxView demonstrate the usage: var

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

2017-07-17 Thread Justin Mclean
Hi, So I’ve looked into it and have rough version code up and so far: - Requires support of styleName in AS which AFAICS is missing and/or not working. Without this 9 CSS classes are needed rather than 6 CSS classes. - DataToolTipBead overrides determinePosition so the base function is still

Re: [01/10] git commit: [flex-asjs] [refs/heads/refactor-strand] - Core changes to IStrand

2017-07-17 Thread piotrz
Hi Harbs, I've created pipelines for your strand-work branch. Just run the build and it failed [1]. [1] https://builds.apache.org/view/E-G/view/Flex/job/FlexJS%20Pipeline/job/feature%252Fstrand-work/2/console Thanks, Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message

[FlexJS] findPopupHost issue

2017-07-17 Thread piotrz
Hi Team, Prashant on users list raised an issue with UIUtils.findPopUpHost(this as IUIBase) [1]. I did quick look into that and I think we should have in findPopUpHost(start:IPopupHost) instead findPopUpHost(start:IUIBase) or Am I miss something ? [1]

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Alex Harui
I'll see if I can fix it. On 7/17/17, 3:05 PM, "Harbs" wrote: >I don’t remember. > >I don’t see where I commented out a test. It looks like I created an >invalid test. Really odd, because I would have thought I’d notice that it >wasn’t working. Also odd, because three

Re: git commit: [flex-asjs] [refs/heads/develop] - Added support for JS upload progress events

2017-07-17 Thread Justin Mclean
Hi, I can see these event name changes haven’t been reverted yet. Do you want me to do that for you? I also note the code is using "”+requestStatus to convert a number to a string. Any reason for not using the toString or String(requestStatus) instead? Thanks, Justin

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

2017-07-17 Thread Justin Mclean
Hi, > All of those ifs are effectively "just-in-case" code. With are likely to be optimised by the compiler AFAIK it doesn’t do that with CSS but I’ll look into it. Thanks, Justin

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
IMO, toXML() is more PAYG. We really shouldn't keep adding to Language. I'm going to figure out why your standalone functions like callLater, assert, etc, aren't handled correctly then we should seriously think about finding a volunteer to break up these utility classes into utility functions

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Harbs
I don’t remember. I don’t see where I commented out a test. It looks like I created an invalid test. Really odd, because I would have thought I’d notice that it wasn’t working. Also odd, because three backslashes seems correct. Shouldn’t that be \” rather than \\” ? Can you fix my mess or

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
I believe you are right in Flash. Same for XMLList(). I’d be happy to write the functions. Should we do a top level toXML() or Language.XML() and Language.XMLList()? The latter seems to fit the pattern for the rest of the language features. > On Jul 18, 2017, at 12:24 AM, Alex Harui

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Alex Harui
Harbs, the log indicates that the last person in that code was you and you commented out the test that would have caught this. What was the reason for that? See log entry 0461e3917. -Alex On 7/17/17, 2:35 PM, "Alex Harui" wrote: >That's odd. That isn't even RegEx,

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Alex Harui
That's odd. That isn't even RegEx, or am I missing something? I didn't think I changed the non-RegEx code paths. I'll take a look. -Alex On 7/17/17, 1:18 PM, "Harbs" wrote: >I’m sorry to report: > >In XMLTest, the following: >private var quotedXML : XML =; > >Outputs:

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Alex Harui
"var self = this;” is added to every method that has inner/local functions. Use of "this" in local functions is changed to use "self" in order to get AS scoping in JS. I think we currently generate a self=this even if the local functions don't need it. Someday the compiler will be smarter about

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
Pretty sure in AS for Flash, you can write (without "new"): var herbs:XML = XML(someXMLListWithOneElement); And it will "do the right thing". I guess we will have to create Language.XML or add a static toXML() on XML and have the compiler catch the top-level function call and redirect it to

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Harbs
The places that I checked look good. Side question: Despite the fact that “this” is no longer used in the callLater function, I noticed that the compiler is inserting "var self = this;” at the start of the function. I don’t think it causes any harm, but it does cause a Google compiler warning

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Harbs
I’m sorry to report: In XMLTest, the following: private var quotedXML : XML =; Outputs: this.quotedXML = new XML( "”); which quite obviously produces an error… > On Jul 17, 2017, at 10:23 AM, Alex Harui wrote: > > I pushed a few more changes. Hopefully nothing else

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Harbs
I’m not going to claim I understand what you just wrote. ;-) I’ll see if I can understand the output… Thanks. > On Jul 17, 2017, at 10:33 PM, Alex Harui wrote: > > Thinking about it more, I think a parameter of type Function never needs > to be wrapped. It would get

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Alex Harui
Thinking about it more, I think a parameter of type Function never needs to be wrapped. It would get wrapped on any assignment in the function body. I just pushed changes to reflect that. -Alex On 7/16/17, 11:41 PM, "Alex Harui" wrote: >Seems reasonable to add a

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
I just tried to see if it might work, but I get an error. Obviously that’s a no-no... [java] /Users/harbs/Documents/ApacheFlex/flex-asjs/frameworks/projects/XML/src/main/flex/XML.as(317): col: 13 A return value is not allowed in a constructor. [java] [java]

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
I don’t think so. Write one where? How? We already have a top level XML constructor. Wouldn’t the compiler output: XML(myXML) as: org.apache.flex.utils.Language.as(myXML,XML)? I’m pretty sure the only way to instantiate an XML object is to use new. Well, I just tried XML(myXMLList) and it

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
I thought we (you) already wrote one. If not, we won't we need one? -Alex On 7/17/17, 12:01 PM, "Harbs" wrote: >Thanks for the pointer. > >I changed the emitter to output indexed access. It seems to work. :-) >(committed) > >I’m not sure what you mean about the top

Re: [Falcon] operand stack underflow?

2017-07-17 Thread Harbs
Yes. I can compile now. Thanks. > On Jul 17, 2017, at 5:46 PM, Alex Harui wrote: > > I just pushed a fix for Yishay's problem. Hopefully it fixes the stack > underflow as well. > > -Alex > > On 7/17/17, 6:38 AM, "Yishay Weiss" wrote: > >>

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
Thanks for the pointer. I changed the emitter to output indexed access. It seems to work. :-) (committed) I’m not sure what you mean about the top level XML function. How does that work in Javascript? > On Jul 17, 2017, at 7:47 PM, Alex Harui wrote: > > You can try

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
You can try #2 by changing ForEachEmitter.java. For the general problem, we should probably just use the XML() top-level function to "coerce" XMLList to XML. My 2 cents, -Alex On 7/17/17, 9:23 AM, "Harbs" wrote: >That is a fourth option. > >In terms of overhead, option

Re: [FlexJS XML] for each

2017-07-17 Thread Harbs
That is a fourth option. In terms of overhead, option #2 is probably cheapest and option #4 is probably most expensive. What’s the difference in terms of difficulty of changing the compiler? I agree with the general problem. It could be that we should to a function to XMLList toXML() (or

Re: [FlexJS XML] for each

2017-07-17 Thread Alex Harui
IMO, this points out a generic problem where in ActionScript: var harbs:XML = SomeXMLListWithOneElement; would auto-coerce the XMLList to XML by grabbing the one element. So we have to deal with that some day. But there is probably a quick fix in the generated code for "for each" where we

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

2017-07-17 Thread Alex Harui
All of those ifs are effectively "just-in-case" code. The reason I asked about using CSS is that it feels like you are creating a whole new layout mechanism that CSS probably already has. So if all of this code could be replaced with, for example, a few lines code that adds a CSS class on the

Re: FlexJS MXML ids and classNames - FLEX-35310

2017-07-17 Thread piotrz
Hi Alex, Ok for me personally that's not the problem. I will create that Bead as an addition which helps with that bug. Adding "localId" without touching "id" it can also satisfy my needs and application which was touched by that problem. I would be happy if other opinion appear on that issue.

Re: [Falcon] operand stack underflow?

2017-07-17 Thread Alex Harui
I just pushed a fix for Yishay's problem. Hopefully it fixes the stack underflow as well. -Alex On 7/17/17, 6:38 AM, "Yishay Weiss" wrote: >This [1] is what I get when building DataBindingExample. Says build is >successful but the following message suggests it is not:

Re: FlexJS MXML ids and classNames - FLEX-35310

2017-07-17 Thread Alex Harui
Hi Piotr, I still don't think the compiler can tell if you will be using an id more than once. At least not with a lot of flow analysis and even then I think we'd miss cases. You should be able to use the same id more than once. You might be removing the first view and replacing it with a

Re: FYI: React appears to be a no-no

2017-07-17 Thread Alex Harui
IMO, it would not preclude a reactjs component set. You can have Cat-X dependencies as long as they are optional. One of the measures of whether a dependency is optional is whether or not a majority of users use that dependency. Just like the CreateJS component set, we can put together a first

Re: Moonshine 1.5.0 Release

2017-07-17 Thread piotrz
Hi, I just post announce on Apache Flex facebook [1]! :) [1] https://www.facebook.com/ApacheFlexSDK/posts/1100785523355723 Thanks, Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context:

RE: [Falcon] operand stack underflow?

2017-07-17 Thread Yishay Weiss
This [1] is what I get when building DataBindingExample. Says build is successful but the following message suggests it is not: [mxmlc] Exception in thread "main" java.lang.AssertionError: Unsupported property value: 1px solid #808080scanning for overrides: IUIBase [1]

RE: [Falcon] operand stack underflow?

2017-07-17 Thread Yishay Weiss
I’m actually able to build after running the following batch file: cd \dev\flexjs\flex-falcon git pull call ant wipe-all cd \dev\flexjs\flex-typedefs call ant wipe git pull cd \dev\flexjs\flex-asjs call ant super-clean git pull ant clean all I am however getting a runtime error because of the

Re: [Falcon] operand stack underflow?

2017-07-17 Thread Harbs
The previous error was what I got when using asconfigc in VS Code. Here’s the stack trace when building using Ant: https://paste.apache.org/Sy93 > On Jul 17, 2017, at 3:09 PM, Harbs wrote: > > I just updated flex-falcon and flex-asjs.

[Falcon] operand stack underflow?

2017-07-17 Thread Harbs
I just updated flex-falcon and flex-asjs. After rebuilding everything, I’m getting the following error when compiling my app: https://paste.apache.org/3wBr This is a new one for me… Suggestions? Harbs

[FlexJS XML] for each

2017-07-17 Thread Harbs
I discovered an issue with “for each” in the XML classes: Currently, for each does the following: The following AS code: var fooList:XMLList = getFooList(); for each(var foo:XML in fooList){ doSomethingWithFoo(foo); } outputs the following JS: var /** @type {XMLList} */ fooList =

Re: FlexJS MXML ids and classNames - FLEX-35310

2017-07-17 Thread piotrz
Hi Alex, That's a valid point and I think I'm willing to change my vote to have localId. Let me understand fully this. If we introduce "localId" - - We will be able to have same id in different view - Introducing that new field is less time consuming than doing solution which I vote for ? -

Re: FYI: React appears to be a no-no

2017-07-17 Thread Harbs
As Dave said, let’s see how this plays out at Facebook, but it’s currently not looking too great.[1] My understanding is that it would preclude a reactjs component set, but I could be wrong. [1]https://github.com/facebook/react/issues/10191#issuecomment-315707719

RE: FYI: React appears to be a no-no

2017-07-17 Thread Yishay Weiss
Does that rule out a reactjs component set (ala createjs)? From: Harbs Sent: Monday, July 17, 2017 12:47 PM To: dev@flex.apache.org Subject: Re: FYI: React appears to be a no-no No. I just thought this was newsworthy. > On Jul 17, 2017,

Re: FYI: React appears to be a no-no

2017-07-17 Thread Harbs
No. I just thought this was newsworthy. > On Jul 17, 2017, at 10:27 AM, Alex Harui wrote: > > I"m not following. Do we currently have a required dependency on React? > > -Alex > > On 7/16/17, 6:19 AM, "Harbs" wrote: > >> The incompatibility

Re: FYI: React appears to be a no-no

2017-07-17 Thread Alex Harui
I"m not following. Do we currently have a required dependency on React? -Alex On 7/16/17, 6:19 AM, "Harbs" wrote: >The incompatibility of React’s license is potentially significant for >FlexJS.[1] >

Re: [FlexJS] Falcon AsJS Mismatch?

2017-07-17 Thread Alex Harui
I pushed a few more changes. Hopefully nothing else broke. -Alex On 7/16/17, 8:52 AM, "Harbs" wrote: >I wasn’t complaining. I was sympathizing. > >If I knew how, I’d help. > >Harbs > >> On Jul 16, 2017, at 6:30 PM, Alex Harui >>wrote: >> >>

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

2017-07-17 Thread Justin Mclean
Hi, > "Slightly fatter" might be acceptable. Your changes looked like a lot of > code. Im not sure you are looking at the same changes I am. All that was added was: - the TOP, BOTTOM, LEFT, RIGHT constants - an if statement with a number of else ifs to work out the positioning - changing

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Alex Harui
Seems reasonable to add a check to see if the function body is for a static method. -Alex On 7/16/17, 11:25 PM, "Harbs" wrote: >A directive could be a solution. > >But I think this is an issue with any static method. If a closure is used >inside a static method, or a

Re: FlexJS MXML ids and classNames - FLEX-35310

2017-07-17 Thread Alex Harui
Well, it makes no sense to me to invent some new property name that sets the "id" of an HTMLElement. I would think we'd get a ton of questions about it. If I"m the only one who thinks that, then I'll stop arguing against it. I thought the consensus upthread was to add localId. -Alex On

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Harbs
A directive could be a solution. But I think this is an issue with any static method. If a closure is used inside a static method, or a function declared inside a static method, it should not use Language.closure. FWIW, the Google compile complains about “this” being used in a static method

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

2017-07-17 Thread Alex Harui
"Slightly fatter" might be acceptable. Your changes looked like a lot of code. Did you rule out using CSS to position the tooltip? We want the examples to be as small as possible to attract users. -Alex On 7/14/17, 6:31 PM, "Justin Mclean" wrote: >Hi, > >Alex you

Re: [FlexJS] Avoiding Language.closure (was Re: [FlexJS] Debugging package)

2017-07-17 Thread Alex Harui
I don't see any current way to suppress the Language.closure. Without flow-analysis, I'm not sure the compiler can tell. It could guess that the identifier is a parameter, but the parameter variable could be assigned within the function body. We could add a new directive like @flexjsisclosure