Re: [FlexJS] Bindable and consts

2017-07-12 Thread Greg Dove
I have a vague recollection of needing some deprecated annotation @expose for static accessors to work in the past because @export did not work. Maybe it was related? -Greg [sent from my phone] On 13/07/2017 6:24 PM, "Alex Harui" wrote: Well, I looked into this and this definitely falls into th

Re: [FlexJS] Use of typeof

2017-07-12 Thread Alex Harui
I think the only thing the compiler does with "window" is allow you to use "window" to disambiguate between a "global" API and another API in a package with the same name. And then the JS.SWC typedefs specify certain APIs. AIUI, Electron is another runtime that has a window variable and you want

Re: [FlexJS] Bindable and consts

2017-07-12 Thread Alex Harui
Well, I looked into this and this definitely falls into the category of "how did this ever work?" The use of [] access is on purpose. When you use [Bindable], everything becomes a getter (and setter if writable) and for statics we have to use [] access to deal with GCC renaming. See this backgro

Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right

2017-07-12 Thread Justin Mclean
Hi, > I noticed today that I was actually using ToolTips and your changes make my > buttons very difficult to use as they are significantly obscured by the > tooltips. Also, the tooltips are now under the mouse, so the text in not > legible until you move the mouse out of the way. On small butt

Re: Multipart

2017-07-12 Thread Harbs
I don’t think he has plans on modifying it. Do you mind making the suggestion about the header to the Github issue? > On Jul 13, 2017, at 7:10 AM, Alex Harui wrote: > > IMO, if the original author will be helping make changes to this file, we > want an ICLA. If he has no plans to work on it, t

Re: Multipart

2017-07-12 Thread Alex Harui
IMO, if the original author will be helping make changes to this file, we want an ICLA. If he has no plans to work on it, then attaching it to a JIRA would be sufficient documentation of his intent to donate it. Either way, it would help if he put the 3rd-party ALv2 header in the file. -Alex On

Re: [FlexJS] Use of typeof

2017-07-12 Thread Harbs
What do we currently do with window? global in Node is the same as window in the browser. All global variables are attached to the global object. global[“foo”] could compile to global[“foo”], global.foo, or just plain foo, and it all means the same thing. > On Jul 13, 2017, at 2:14 AM, Alex Ha

Re: Multipart

2017-07-12 Thread Harbs
In our repo with my modifications for FlexJS. > On Jul 13, 2017, at 1:22 AM, Alex Harui wrote: > > What do you mean by "adopt". That the new home for further improvements > is in our repo or that we're using it as a third-party dependency? > > -Alex > > On 7/12/17, 12:45 PM, "Harbs" wrote:

Re: [FlexJS] Use of typeof

2017-07-12 Thread Alex Harui
What AS do you want to write and what JS do you want as output? -Alex On 7/9/17, 12:53 AM, "Harbs" wrote: >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.

Re: Multipart

2017-07-12 Thread Alex Harui
What do you mean by "adopt". That the new home for further improvements is in our repo or that we're using it as a third-party dependency? -Alex On 7/12/17, 12:45 PM, "Harbs" wrote: >There’s a great class for uploading multi-part HTTP requests. I’ve been >using it for years, and I’ve ported it

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Alex Harui
I'm unable to gather from this thread what code is being generated and what errors are being generated when it doesn't work. -Alex On 7/12/17, 12:39 PM, "Harbs" wrote: >I tried on a simpler project and the only thing being output is a trace >declaration with an empty function: >u('org.apache.fl

Re: Flash builder is stucked at 57 %

2017-07-12 Thread Alex Harui
I think you do have to run the browser specified in preferences/general/Web Browser. Make sure the browser specified has the debugger flash player. Does the browser appear at all? -Alex On 7/12/17, 10:15 AM, "after24" wrote: >The Run button doesn't launch the project in the browser neither.

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Alex Harui
Bummer. It looks like you are using a custom template and I never tried that. I think you can just check for a null mainCU and get past that. On 7/12/17, 10:11 AM, "Harbs" wrote: >Maybe I’m doing something wrong, but I get the following error when I >tried using -skip-transpile: > > [java]

Re: FlexJS Yeoman generator

2017-07-12 Thread Harbs
Wow. That is pretty cool! Talk about dogfooding. ;-) It’s really nice to see an actual project targeting node. The way you setup the typdefs was very educational for me. I didn’t realize it can be done like that. Thanks! > On Jul 12, 2017, at 11:24 PM, Josh Tynjala wrote: > > Thanks, Harbs!

Re: FlexJS Yeoman generator

2017-07-12 Thread piotrz
Posted! :) -> https://www.facebook.com/ApacheFlexSDK/posts/1096855740415368 Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-Yeoman-generator-tp63178p63183.html Sent from the Apache Flex Developme

Re: FlexJS Yeoman generator

2017-07-12 Thread Harbs
You are full of surprises. :-) I’d love to hear the details. That would make an incredible article. Thanks, Harbs > On Jul 12, 2017, at 11:24 PM, Josh Tynjala wrote: > > I even figured out how to make Travis CI compile with FlexJS (and Travis is > running Linux, by the way): > > https://travi

Re: FlexJS Yeoman generator

2017-07-12 Thread piotrz
Ahh yes! :) But my English is always a problem. I will try to make it nice! :) Thanks, Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-Yeoman-generator-tp63178p63182.html Sent from the Apache Fle

Re: FlexJS Yeoman generator

2017-07-12 Thread Harbs
Feel free. You know how I feel about using Facebook. ;-) > On Jul 12, 2017, at 11:03 PM, piotrz wrote: > > Go ahead and post it on our facebook!

Re: FlexJS Yeoman generator

2017-07-12 Thread piotrz
Hi Harbs, Awesome! :) Go ahead and post it on our facebook! Thanks Josh! :) Piotr - Apache Flex PMC piotrzarzyck...@gmail.com -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-Yeoman-generator-tp63178p63179.html Sent from the Apache Flex Develo

Re: FlexJS Yeoman generator

2017-07-12 Thread Josh Tynjala
Thanks, Harbs! This project is actually written in ActionScript and built with the Node.js module support in FlexJS 0.8. Here's the source code on Github: https://github.com/BowlerHatLLC/generator-flexjs I even figured out how to make Travis CI compile with FlexJS (and Travis is running Linux, b

FlexJS Yeoman generator

2017-07-12 Thread Harbs
Looks like Josh has been busy again! https://www.patreon.com/posts/scaffold-apache-12918005 This makes creating new FlexJS projects a breeze even for newbies. Way to go Josh! :-) If someone wants to tweet about this and/or post on Facebo

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
I tried on a simpler project and the only thing being output is a trace declaration with an empty function: u('org.apache.flex.utils.Language.trace',m()); All calls to trace() are stripped out by the google compiler. This looks to be the case even without modifying the Language.trace output. FW

Multipart

2017-07-12 Thread Harbs
There’s a great class for uploading multi-part HTTP requests. I’ve been using it for years, and I’ve ported it for use with FlexJS. It works great in that context too. I just asked the author if he minds if we adopt it and he’s very happy for us to do so.[1] It’s one class. Do we need to go th

Re: Flash builder is stucked at 57 %

2017-07-12 Thread after24
The Run button doesn't launch the project in the browser neither. I can't find where to point to a browser in the run configuration (I set the browser in preferences/general/ web browser) -- View this message in context: http://apache-flex-development.247.n4.nabble.com/Flash-builder-is-stu

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
Maybe I’m doing something wrong, but I get the following error when I tried using -skip-transpile: [java] java.lang.NullPointerException org.apache.flex.compiler.internal.projects.FlexJSProject.computeTargetAttributes(FlexJSProject.java:354)org.apache.flex.compiler.internal.codegen.mxml.fle

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Alex Harui
Trace supports multiple parameters and concatenates them with " " in-between. If you want to investigate more, you can use -sdk-js-lib to point to a hacked version of Language.js with goog.DEBUG around the "rest" code. I think you can also just modify what is in bin/js-debug and run the compiler

Re: Flash builder is stucked at 57 %

2017-07-12 Thread Alex Harui
Hmm, you are the second person this week with debugger connection issues. Can you use the "Run" option from FB to run the app without the debugger? Maybe FB can't figure out how to launch the browser. Check the Run configuration to make sure it is pointed to a valid browser. What OS and what ver

Re: Flash builder is stucked at 57 %

2017-07-12 Thread after24
Hi Alex, I Already searched the web for "Flash Builder Stuck at 57" but the solutions I found didn't fixed the issue. The debugger player (26.0.0.137) is installed and when I manually launch the project html file generated in the bin-debug folder, flash builder resume the debug process ans is conn

Re: Flash builder is stucked at 57 %

2017-07-12 Thread Alex Harui
Search the internet for "Flash Builder Stuck at 57". You are not alone. Make sure you have a debugger Flash Player installed. Flash Auto Updater can overwrite your debugger version. -Alex On 7/12/17, 8:44 AM, "after24" wrote: >Hello, > >I am facing an issue with flash builder (only on one wo

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Harbs
Yes. That works too: -js-compiler-option='--debug' -js-compiler-option='--formatting PRETTY_PRINT' Thanks. > On Jul 12, 2017, at 6:11 PM, Alex Harui wrote: > > In theory, you should have been able to use -js-compiler-option more than > once. > > -Alex > > On 7/12/17, 6:53 AM, "Harbs" wrote:

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
That line was what was left of the trace function. The reason the trace function is not completely empty is because it has this code generated from "…rest” at the start of the function: rest = Array.prototype.slice.call(arguments, 0); I have no idea why that code is necessary. Maybe if it was no

Flash builder is stucked at 57 %

2017-07-12 Thread after24
Hello, I am facing an issue with flash builder (only on one workspace, other workspaces are fine) where the execution process is blocked at 57 %. If I go directly in the bin-debug folder and launch manually the generated "project.html" file, it works and the link to the debugger is done. I suppo

Re: Flash Builder desktop debugging issue

2017-07-12 Thread Alex Harui
Location of mm.cfg is listed here [1] If mm.cfg is ok, next step is to use the command-line debugger. For AIR apps, you have to launch bin/fdb from the SDK folder, then type 'r' and return. This should cause the debugger to wait for the next runtime to launch. Then run the ads command you see i

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Alex Harui
In theory, you should have been able to use -js-compiler-option more than once. -Alex On 7/12/17, 6:53 AM, "Harbs" wrote: >Thanks. That does in fact work. > >Here’s what I used: >-js-compiler-option='--formatting PRETTY_PRINT --debug' > >Of course, I’m not sure how helpful this is because it lo

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Alex Harui
If it were up to me, we'd strip traces based on the optimize compiler option. I think that's how it worked in the Flex SDK. I thought GCC had enough dead-code-removal logic to remove Language.trace once it saw that trace effectively did nothing. I can't seem to piece together from this thread wh

Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right

2017-07-12 Thread Harbs
FYI: I noticed today that I was actually using ToolTips and your changes make my buttons very difficult to use as they are significantly obscured by the tooltips. Also, the tooltips are now under the mouse, so the text in not legible until you move the mouse out of the way. On small buttons thi

Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right

2017-07-12 Thread Alex Harui
I think we need both. I'm not sure if x,y will work on a row of buttons with different widths. Maybe the position can be expressed in CSS? -Alex On 7/11/17, 11:50 PM, "Justin Mclean" wrote: >Hi, > >1. >> Yes, I think we need more variants. > >2. >> Maybe the default tooltip bead should be slig

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Harbs
Never mind. There was an error in my app that was preventing the minification and the step that renames things. It is renamed, but to legible names. This should prove very useful! :-) Interesting to note: Even after renaming and combining lots of lines (pretty printing is still VERY dense), my

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Harbs
FYI, here’s a sample of what the code looks like with those options enabled.[1] Harbs [1]https://paste.apache.org/OM4H > On Jul 12, 2017, at 5:03 PM, Harbs wrote: > > Never mind. There was an error in my app that was preventing the minification > and the step th

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
Interesting scenarios. I would not have thought of that. If we could figure out how to strip the function call and leave the parameter, the compiler would strip out the contents if it could be safely removed. So trace(“something”) would become “something” which is en empty statement and would b

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Harbs
Thanks. That does in fact work. Here’s what I used: -js-compiler-option='--formatting PRETTY_PRINT --debug' Of course, I’m not sure how helpful this is because it looks like nothing has been renamed. Every bug I’ve encountered that was specific to minified code was due to renaming in some way…

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Josh Tynjala
Probably the same with function calls too: trace(someFunction()); They wanted this to remain: someFunction(); - Josh On Wed, Jul 12, 2017 at 6:22 AM, Josh Tynjala wrote: > One thing to keep in mind with stripping out trace() calls is that some > developers expect any modifications to variabl

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Josh Tynjala
One thing to keep in mind with stripping out trace() calls is that some developers expect any modifications to variables that happen inside the arguments to remain. I remember a while back someone at Adobe mentioning that people complained when something like this was completely stripped out: trac

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Josh Tynjala
You should include the dashes, and you should surround everything in quotes. I think you put spaces between each option, but I've never used more than one. Here's a Closure option I've successfully used: -js-compiler-option="--compilation_level SIMPLE_OPTIMIZATIONS" - Josh On Tue, Jul 11, 2017

[OT] FYI: XHR pitfall

2017-07-12 Thread Harbs
We discovered today that just attaching an event listener to an xhr.upload will cause the browser to do an OPTIONS request.[1] This is really annoying because if you want progress events for an upload, the server CORS configuration has to be configured to allow OPTIONS. We were going to add upl

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
Like I said, it would be nice to figure out how to remove it completely. It’s not awfully expensive though. It’s a simple copy of an array with a single string. > On Jul 12, 2017, at 11:52 AM, Justin Mclean wrote: > > Hi, > >> function >> uM(a){a=Array.prototype.slice.call(arguments,0)}w('or

Re: Flash Builder desktop debugging issue

2017-07-12 Thread Fréderic Cox
When I change my SDK it is giving me the same problem. Process terminated without establishing connection to debugger. trace1 trace2 Launch command details: "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0 (AIR 3.8)/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0 (AIR 3.8)/

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Justin Mclean
Hi, > function > uM(a){a=Array.prototype.slice.call(arguments,0)}w('org.apache.flex.utils.Language.trace',uM); I could be wrong but wouldn’t the call to Array.prototype.slice still be rather expensive? Thanks, Justin

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
I don’t know. I don’t use logging nearly as much as I probably should. I was just pointing out the goog.log package on the JS side in case you want to implement something. Thanks, Harbs > On Jul 12, 2017, at 10:39 AM, Justin Mclean wrote: > > Hi, > >> It might be nice to have a generic cross

Re: [FalconJX] Debugging minified code

2017-07-12 Thread Harbs
Sometimes it’s not too hard to figure out what’s going on, but sometimes it’s a real pain. The situation where I had a comparison against a constant in a bindable class was a real doozy. It was in the middle of a lot of XML parsing and I originally thought there was a problem with the XML classe

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Justin Mclean
Hi, > It might be nice to have a generic cross-platform logging package. Like mx.logging perhaps? Or Apache common logging as there's an AS version of that? I don’t imagine either would be hard to make cross platform. Thanks, Justin

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
There is a goog.log package.[1] Unless I’m mistaken, those calls are removed by the compiler. It might be nice to have a generic cross-platform logging package. [1]https://google.github.io/closure-library/api/goog.log.html > On Jul 12

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
Oof. I think I’m still waking up. ;-) I did not realize what I was looking at with the goog.DEBUG. My recollection is that trace statements are still being used in the release, but I’ll double check that. > On Jul 12, 2017, at 9:56 AM, Alex Harui wrote: > > Well, the goal of using goog.DEBUG

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Harbs
My bad. It does in fact compile down to this: function uM(a){a=Array.prototype.slice.call(arguments,0)}w('org.apache.flex.utils.Language.trace',uM); So trace does not actually do anything. Great! :-) However, it’s still being called by the client code. (It just does nothing.) Not super importa

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Justin Mclean
Hi, > Once we’re on this topic, there’s something that I had wanted to bring up for > a long time: I think trace statements should disappear in the release JS > build. Should we put all the JS trace code inside an if(goog.DEBUG) block? I’d suggest putting in a static Log class/method that is d

Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST

2017-07-12 Thread Alex Harui
Well, the goal of using goog.DEBUG in Language.as trace() was to convince GCC to eliminate trace(). I haven't checked whether it is working or not. Requiring everyone to use goog.DEBUG around trace statements sounds like a pain. Probably better to teach the publisher to remove it if GCC can't be