Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread Justin Mclean
Hi,

> Raise a jira for Bindable - I will try to look into that.

Here you go https://issues.apache.org/jira/browse/FLEX-35265

> What's the difference between BindableCSSStyles to ContainerDataBinding ?

Code is very different looks like BindableCSSStyles just specifies the list of 
styles to watch for, where as ContainerDataBinding does all of the actually 
binding work. 

Thanks,
Justin





Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - - Fix not working numElements - Fix failing internalChildren function when element is undefined

2017-02-12 Thread yishayw
numElements works for me. The problem you found was with $numElements. I
think we haven't seen a bug thus far because ContainerBase.$numElements just
calls super.numElements which returns the number of elements in UIBase.
Usually (always?) there's one component there, which is the internal
contentView. ContainerBase.numElements, on the other hand, returns the
number of elements in the contentView itself.

In short, $numElements in all scenarios I'm aware of is 1. I suppose a
defined function implicitly cast to an int will return 1 as well (haven't
tried it).

BTW, I see the same problem in ContainerBaseStrandChildren.$numElements and
in ListBaseStrandChildren.$numElements.



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/Re-1-2-git-commit-flex-asjs-refs-heads-develop-Fix-not-working-numElements-Fix-failing-internalChildd-tp59183p59288.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread piotrz
Justin,

Raise a jira for Bindable - I will try to look into that. What's the
difference between BindableCSSStyles to ContainerDataBinding ?

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Setting-background-colour-at-run-time-fails-tp59273p59287.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread Justin Mclean
Hi,

>> Also using BindableCSSStyles like so doesn’t change the style box. In
>> fact the initial style is not set either.
>> 
>> Is it intended to be used in this way? If so that looks to be a bug to me.
> 
> FlexStore uses BindableCSSStyles.  See if that usage pattern works for you.

I just did and it failed to work, see the code I just posted, unless that is 
I’m not using it correctly

Thanks,
Justin

Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread Alex Harui

On 2/12/17, 10:07 PM, "Justin Mclean"  wrote:

>Hi,
>
>Also using BindableCSSStyles like so doesn’t change the style box. In
>fact the initial style is not set either.
>
>Is it intended to be used in this way? If so that looks to be a bug to me.

FlexStore uses BindableCSSStyles.  See if that usage pattern works for you.

-Alex




Re: [FlexJS] maven faling (WeakMap)

2017-02-12 Thread Alex Harui
Hopefully I fixed it.

On 2/12/17, 3:25 PM, "Harbs"  wrote:

>It compiles in ant. It looks like the Maven build does not recognize
>ES2015 APIs. I don’t know how to point it to the right typedefs.




Re: [FlexJS] CompressionUtils (linking scripts)

2017-02-12 Thread Alex Harui


On 2/12/17, 3:17 PM, "Harbs"  wrote:

>I just added a CompressionUtils class which uses ByteArray on the Flash
>side and pako on the javascript side.
>
>It uses inject_html to link to the js because I don’t know of a better
>way to currently do this.
>
>I don’t like this approach for a number of reasons:
>1. It hardwires the link into the generated HTML. In this case it’s using
>the “best” cdn, but it does not allow the content to be hosted on the app
>server.
>2. There’s no (easy) way to link to relative paths when an app is being
>loaded locally. Requiring it be downloaded from the internet is
>inefficient, and does not allow the app to be run when there’s no
>internet connection.

Somewhere in the work queue is having inject_html copy over local files
referenced in the injected HTML.

>3. This will not work for Node.js. Node.js needs require(‘pako’) instead
>of linking to the script.
>
>Here’s what I’m thinking: I’d like to have a “Require” tag which would
>cause FlaconJX to do the right thing depending on the compilation. If
>it’s compiling for Node.js, it would require() the dependency. If it’s
>compiling for the browser, it would link to a relative path if that path
>exists (there would be some standardized way of linking) or to a url if
>not (assuming a url is provided).
>
>I don’t really care what the require tag looks like, but I personally
>like metadata over the comment approach. It could also be a function call
>which the compiler recognizes as a “special” one which gets optimized out.
>
>So something like this:
>
>[Require(name=“pako",
>url="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js”)]
>
>or:
>/**
>* @require pako, 
>https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js
>
>*/
>or:
>require(‘pako’,'https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min
>.js' );
>where the signature for require would be:
>require(name:String,url:String=“”)

Sounds like work.  Feel free to try to make the changes.  An alternative
might be to have a "NodeCompressionUtils" that has the appropriate require
in it?  Or is this a general problem for Node?

-Alex



Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread Justin Mclean
Hi,

Also using BindableCSSStyles like so doesn’t change the style box. In fact the 
initial style is not set either. 

Is it intended to be used in this way? If so that looks to be a bug to me.


http://ns.adobe.com/mxml/2009;
   xmlns:js="library://ns.apache.org/flexjs/basic">





   

   
   
   

   
   
   
   
   
   
   
   




Thanks,
Justin

Re: Donating to Apache Flex

2017-02-12 Thread Alex Harui


On 2/12/17, 4:25 PM, "Justin Mclean"  wrote:

>Hi,
>
>> Don't worry about finances, that's an ASF corporate question - to start
>> with, look at the directed funding proposal from the past President's
>> report in a board report.
>
>Alex’s suggestion as I understand it  doesn’t seem to fit with the above
>experiment. Alex (please correct me if I’m mistaken here) but you’re
>looking for lots of small donations from many (possibly unknown) people
>rather than a single largish donor up front right?

Yes.  I explicitly asked on board@ if I should continue to pursue this
idea even though it doesn't close to the 50K threshold mentioned in the
minutes and they said to go ahead.  My takeaway is that the Prez report
was an opinion and not a policy.  We need to solidify a proposal.  They
might still say no, but right now I am an additional person investigating
directed funding options so they don't have to spend time on it.  Maybe we
will come up with a good new idea.  Or not.

Thoughts on other responses:

Fundamentally, regardless of Apache "direction", it occurs to me that it
is just plain wrong for Flex to be a net consumer of resources at Apache.
Really, all projects should be striving to be providers, by bringing in
enough donations to not only pay for ourselves, but also have some extra
for the other projects that need help.  So I don't know how many of you
contribute money to the ASF and are willing to go public about it, but
before I go asking for a new VM from Apache I'd want to know we are
putting enough money in to effectively pay for it.  And that's the problem
for me:  if I write a check to the ASF, I can't currently earmark it for a
VM for Flex.

To me, the "Donate to the ASF" goal is different enough from the "Donate
to Flex" goal that it seems worth trying the latter.  The "Donate to the
ASF" goal is about altruism for open source software in general.  I'm
willing to give a certain percentage of my salary to good causes.  But I'm
willing to give more to help my community, because I hope to get payback
in other ways.

So sure, there may not appear to be a need to do something like this now
since things are working.  But just like you re-do the roof on your house
before it starts to leak, I want to find out what it would take to track
if we are paying for ourselves.  Would it require an actual separate bank
account?  Don't know.  Would we get a "cost center" like in my $dayjob?
Don't know.  We'll find out if we get that far.

I guess I didn't understand what Justin meant by "Professional Services".
The ASF doesn't want to pay for folks to write code, and I think that
include documentation as well.  But could the collection of lots of little
donations require that we pay for professional accountants?  It could.
The ASF already pays for professional financial management.

If some people want to collect money to pay folks to write documentation,
I think that needs to be done in a separate effort.

CI on builds.a.o is working nicely.  But what changes would be required to
move it to apacheflexbuilds?  Isn't there something special about
builds.a.o and its capability to publish Maven artifacts?

Other folks on past directed donation threads on other ASF lists have
expressed concerns about rich projects and poor projects.  IMO, the ASF
could implement a graduated tax.  Right now they are just saying 15%, but
they could raise it in general or tax higher incomes more.  In the US,
income is taxed on a graduated basis topping out at 35% or so.  I think it
is much higher outside the US isn't it?  15% may be too low.  It just has
be the right number to fund what needs to be funded without discouraging
donations.  I'd bet the higher income projects are also big consumers of
resources so there'd be enough money from the taxes to pay for the "poor"
projects.

We would have to have language that says that your donation is not
guaranteed to be used for what you want it to be.  I think many
fundraising manage to get this wording right enough to be successful.
We'd probably have to have language that if money doesn't get used or the
project goes to that attic someday that all funds will go to the ASF
general fund.

We would use the same decision making process to decide what to spend
money on as we do for deciding what code donations to take and other
project-level decisions.

I'm hoping that we don't have to do the same things that Infra currently
does.  I believe my Azure account pays for a lot of what Infra does.
Azure folks keep the servers up and running.  "All" we have to do is
install and maintain apps like Jenkins which several of us have already
figured out how to do, and maybe some day JIRA, maybe a web server, who
knows.  I already learned how to set up JIRA when migrating the Flex bugs
from Adobe.  These things feel more like application usage than "Infra"
stuff.

We will have to have security on everything whether it is server-side or
client-side.  We will be writing a ton of 

[FlexJS] HTTTPService modifies headers when it shouldn't

2017-02-12 Thread Justin Mclean
Hi,

When running a HTTPServer call I'm getting the following browser errors:

Refused to set unsafe header "Content-length"
org.apache.flex.net.HTTPService.send @ HTTPService.js:167

Refused to set unsafe header "Connection"
org.apache.flex.net.HTTPService.send @ HTTPService.js:168

Should probably remove code setting these two headers. For reason see for 
example [1]

This only happens on a HTTP POST not a GET.

Thanks,
Justin

1. 
http://stackoverflow.com/questions/7210507/ajax-post-error-refused-to-set-unsafe-header-connection



Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread Justin Mclean
Hi,

> [1] 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-Applying-styles-td56104.html#a56120

Thanks for that, that’s unfortunate. I think both Flex and JS developers are 
going to run into that as they expect to be able to modify styles at runtime, 
in particular for simple UI changes.

Thanks,
Justin

Re: [FlexJS] Data-binding fails when following multiple references

2017-02-12 Thread sankar
Hi Piotr,

Sure, if we need to move early (than you fix) we'll probably need to move
with the basic proven way of binding (to tab type of components). But I'm
afraid some of the application here based on rendering dynamic data. Thus
tabs and some other items shall be drawn after data available to the
application. I shall check if BasicBinding can address this requirement than
ConstantBinding.

Thank you, Priotr.



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59278.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Setting background colour at run time fails

2017-02-12 Thread yishayw
See this [1] discussion.

[1]
http://apache-flex-development.247.n4.nabble.com/FlexJS-Applying-styles-td56104.html#a56120



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Setting-background-colour-at-run-time-fails-tp59273p59277.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Uncaught type exception

2017-02-12 Thread Alex Harui


On 2/12/17, 1:39 AM, "piotrz"  wrote:

>Alex,
>
>In case of raised jira by Justin - do you think that bug is inside
>compiler
>or do you want me to look into that?

You are welcome to look into it.  Maybe you or Justin can build the exact
same test case in regular Flex so we can compare how Flex handles this.
The Flex version should not use the typical invalidateProperties pattern
and directly apply a property to a child element.

It may turn out not to be a bug per-se.  We might be generating the exact
same code, and the difference is that in FlexJS we are trying to see how
far we can go without putting in a whole invalidation subsystem.

Thanks,
-Alex



[4.16.0] # Apache Flex SDK 4.16.0 nightly build 232: Successful

2017-02-12 Thread flex . ci . builds
flex-sdk_release-candidate - Build #232 - Successful

Changes since last build:
No changes

For more information, check the console output at 
http://apacheflexbuild.cloudapp.net:8080/job/flex-sdk_release-candidate/232/.

Re: Donating to Apache Flex

2017-02-12 Thread Justin Mclean
Hi,

> Don't worry about finances, that's an ASF corporate question - to start
> with, look at the directed funding proposal from the past President's
> report in a board report.

Alex’s suggestion as I understand it  doesn’t seem to fit with the above 
experiment. Alex (please correct me if I’m mistaken here) but you’re looking 
for lots of small donations from many (possibly unknown) people rather than a 
single largish donor up front right?

> That's a question for fundraising@ which we'll work on when a project
> comes forward with a likely donor.

If I am mistaken re above do we have any likely donor(s) in mind?

Thanks,
Justin



[FlexJS] Setting background colour at run time fails

2017-02-12 Thread Justin Mclean
Hi,

Any reason this may fail (ie the box isn’t turned form black to red) when 
clicking on the button?

I can see that parseStyles is working correctly and returning 
{background-color: "red”} and I can see that a stylesChanged event is being 
dispatched.

Is it a bug or is there another way you are expected to change styles in FlexJS?


http://ns.adobe.com/mxml/2009;
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:comp="comp.*">

















Thanks,
Justin



Re: [FlexJS] maven faling (WeakMap)

2017-02-12 Thread Harbs
It compiles in ant. It looks like the Maven build does not recognize ES2015 
APIs. I don’t know how to point it to the right typedefs.

> On Feb 13, 2017, at 1:19 AM, Carlos Rovira  wrote:
> 
> Hi,
> 
> Harbs I think something goes wrong with your last commit. Could you take a
> look?
> 
> [INFO] Executing COMPC in tool group FlexJS with args:
> [-load-config=/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/target/compile-js-config.xml,
> -js-output-type=FLEXJS, -compiler.strict-xml=true]
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(45):
> col: 31 Access of possibly undefined property WeakMap.
> 
> 
>if(typeof WeakMap == "function")
> 
>  ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(46):
> col: 36 Call to a possibly undefined method WeakMap.
> 
> 
>_map = new WeakMap();
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(47):
> col: 36 Access of possibly undefined property Map.
> 
> 
>else if(typeof Map == "function")//Map is supported,
> fall back to that
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(49):
> col: 36 Call to a possibly undefined method Map.
> 
> 
>_map = new Map();
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(58):
> col: 32 Access of possibly undefined property Map.
> 
> 
>else if(typeof Map == "function")
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(59):
> col: 32 Call to a possibly undefined method Map.
> 
> 
>_map = new Map();
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(165):
> col: 28 Call to a possibly undefined method WeakMap.
> 
> 
>_map = new WeakMap();
> 
>   ^
> 
> 
> /Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(167):
> col: 28 Call to a possibly undefined method Map.
> 
> 
>_map = new Map();
> 
>   ^
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira



Re: [FlexJS] Stuck due to "Dictionary"

2017-02-12 Thread Harbs
I did not know there are polyfills, but it looks like I did a (simplified) 
solution similar to what I see here:
https://github.com/Benvie/harmony-collections/blob/master/harmony-collections.js
 


I already uploaded what I did. Feel free to improve it… :-)

Harbs

> On Feb 13, 2017, at 1:14 AM, Carlos Rovira  
> wrote:
> 
> Hi Harbs,
> 
> When I read about Josh lines about Map and WeakMap y saw that there are
> some polyfills out there to support older browsers. You implemented this
> using some polyfill or you found some other way to do it?
> 
> If you plan to upload this in the following days I'll wait for it.
> 
> Thanks
> 
> Carlos
> 
> 
> 
> 2017-02-13 0:04 GMT+01:00 Harbs :
> 
>> I had a need for Dictionary for my purposes as well (i.e. using Objects as
>> keys).
>> 
>> I just implemented ObjectMap which wraps Map, WeakMap and Dictionary. It
>> falls back to plain objects for browsers which do not support Map and
>> inserts uids into the objects.
>> 
>> It’s not tested yet, but it compiles. I expect to test it in the next few
>> days.
>> 
>>> On Feb 10, 2017, at 1:33 AM, Alex Harui  wrote:
>>> 
>>> Also consider whether you truly need Dictionary or not.  A Weak Reference
>>> Dictionary of Classes, for example, is completely unnecessary if you have
>>> a single ApplicationDomain application.  The classes are never going to
>> be
>>> unloaded, so you don't need weak references to them.
>>> 
>>> I was able to get Spark HelloWorld to run on FlexJS without using a
>>> Dictionary because I took some shortcuts since HelloWorld is a single SWF
>>> application.
>>> 
>>> Also note that, in the browsers I tested, if you put an Object as a key
>>> for an Object, the JS runtime seems to call toString() on it to get a
>> key.
>>> And also remember that Classes and Instances are all mutable in JS so you
>>> can hang a UID on each instance/object to use as a key if you want.
>>> 
>>> HTH,
>>> -Alex
>>> 
>>> PS:  The next thing you should look for in the code is use of weak
>>> reference listeners.  I don't have a good answer for that.
>>> 
>>> 
>>> On 2/9/17, 2:23 PM, "Josh Tynjala"  wrote:
>>> 
 If you only need strings as keys, then Object is the right choice.
 
 JavaScript has Map and WeakMap for non-string keys, which is similar to
 Flash Player's Dictionary:
 
 https://developer.mozilla.org/en-US/docs/Web/JavaScript/
>> Reference/Global_O
 bjects/Map
 https://developer.mozilla.org/en-US/docs/Web/JavaScript/
>> Reference/Global_O
 bjects/WeakMap
 
 Be aware that Map and WeakMap are relatively new in JavaScript. For
 instance, it looks like IE11 has partial support (with full support in
 Edge), but older versions of IE can't use it.
 
 - Josh
 
 On Thu, Feb 9, 2017 at 2:13 PM, Carlos Rovira 
 wrote:
 
> Hi,
> 
> we have some flash Dictionary replacement?
> If not what we could use instead? or what is the recommended approach?
> 
> thanks!
> 
> 
> 
> --
> Carlos Rovira
> http://about.me/carlosrovira
> 
>>> 
>> 
>> 
> 
> 
> -- 
> 
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
> 
> Este mensaje se dirige exclusivamente a su destinatario y puede contener
> información privilegiada o confidencial. Si ha recibido este mensaje por
> error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
> proceda a su destrucción.
> 
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
> que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.



[FlexJS] maven faling (WeakMap)

2017-02-12 Thread Carlos Rovira
Hi,

Harbs I think something goes wrong with your last commit. Could you take a
look?

[INFO] Executing COMPC in tool group FlexJS with args:
[-load-config=/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/target/compile-js-config.xml,
-js-output-type=FLEXJS, -compiler.strict-xml=true]

/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(45):
col: 31 Access of possibly undefined property WeakMap.


if(typeof WeakMap == "function")

  ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(46):
col: 36 Call to a possibly undefined method WeakMap.


_map = new WeakMap();

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(47):
col: 36 Access of possibly undefined property Map.


else if(typeof Map == "function")//Map is supported,
fall back to that

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(49):
col: 36 Call to a possibly undefined method Map.


_map = new Map();

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(58):
col: 32 Access of possibly undefined property Map.


else if(typeof Map == "function")

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(59):
col: 32 Call to a possibly undefined method Map.


_map = new Map();

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(165):
col: 28 Call to a possibly undefined method WeakMap.


_map = new WeakMap();

   ^


/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ObjectMap.as(167):
col: 28 Call to a possibly undefined method Map.


_map = new Map();

   ^


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


[FlexJS] CompressionUtils (linking scripts)

2017-02-12 Thread Harbs
I just added a CompressionUtils class which uses ByteArray on the Flash side 
and pako on the javascript side.

It uses inject_html to link to the js because I don’t know of a better way to 
currently do this.

I don’t like this approach for a number of reasons:
1. It hardwires the link into the generated HTML. In this case it’s using the 
“best” cdn, but it does not allow the content to be hosted on the app server.
2. There’s no (easy) way to link to relative paths when an app is being loaded 
locally. Requiring it be downloaded from the internet is inefficient, and does 
not allow the app to be run when there’s no internet connection.
3. This will not work for Node.js. Node.js needs require(‘pako’) instead of 
linking to the script.

Here’s what I’m thinking: I’d like to have a “Require” tag which would cause 
FlaconJX to do the right thing depending on the compilation. If it’s compiling 
for Node.js, it would require() the dependency. If it’s compiling for the 
browser, it would link to a relative path if that path exists (there would be 
some standardized way of linking) or to a url if not (assuming a url is 
provided).

I don’t really care what the require tag looks like, but I personally like 
metadata over the comment approach. It could also be a function call which the 
compiler recognizes as a “special” one which gets optimized out.

So something like this:

[Require(name=“pako", 
url="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js”)]

or:
/**
* @require pako, https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js 

*/
or:
require(‘pako’,'https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js' 
);
where the signature for require would be:
require(name:String,url:String=“”)

Thoughts?
Harbs

Re: [FlexJS] Stuck due to "Dictionary"

2017-02-12 Thread Carlos Rovira
Hi Harbs,

When I read about Josh lines about Map and WeakMap y saw that there are
some polyfills out there to support older browsers. You implemented this
using some polyfill or you found some other way to do it?

If you plan to upload this in the following days I'll wait for it.

Thanks

Carlos



2017-02-13 0:04 GMT+01:00 Harbs :

> I had a need for Dictionary for my purposes as well (i.e. using Objects as
> keys).
>
> I just implemented ObjectMap which wraps Map, WeakMap and Dictionary. It
> falls back to plain objects for browsers which do not support Map and
> inserts uids into the objects.
>
> It’s not tested yet, but it compiles. I expect to test it in the next few
> days.
>
> > On Feb 10, 2017, at 1:33 AM, Alex Harui  wrote:
> >
> > Also consider whether you truly need Dictionary or not.  A Weak Reference
> > Dictionary of Classes, for example, is completely unnecessary if you have
> > a single ApplicationDomain application.  The classes are never going to
> be
> > unloaded, so you don't need weak references to them.
> >
> > I was able to get Spark HelloWorld to run on FlexJS without using a
> > Dictionary because I took some shortcuts since HelloWorld is a single SWF
> > application.
> >
> > Also note that, in the browsers I tested, if you put an Object as a key
> > for an Object, the JS runtime seems to call toString() on it to get a
> key.
> > And also remember that Classes and Instances are all mutable in JS so you
> > can hang a UID on each instance/object to use as a key if you want.
> >
> > HTH,
> > -Alex
> >
> > PS:  The next thing you should look for in the code is use of weak
> > reference listeners.  I don't have a good answer for that.
> >
> >
> > On 2/9/17, 2:23 PM, "Josh Tynjala"  wrote:
> >
> >> If you only need strings as keys, then Object is the right choice.
> >>
> >> JavaScript has Map and WeakMap for non-string keys, which is similar to
> >> Flash Player's Dictionary:
> >>
> >> https://developer.mozilla.org/en-US/docs/Web/JavaScript/
> Reference/Global_O
> >> bjects/Map
> >> https://developer.mozilla.org/en-US/docs/Web/JavaScript/
> Reference/Global_O
> >> bjects/WeakMap
> >>
> >> Be aware that Map and WeakMap are relatively new in JavaScript. For
> >> instance, it looks like IE11 has partial support (with full support in
> >> Edge), but older versions of IE can't use it.
> >>
> >> - Josh
> >>
> >> On Thu, Feb 9, 2017 at 2:13 PM, Carlos Rovira 
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> we have some flash Dictionary replacement?
> >>> If not what we could use instead? or what is the recommended approach?
> >>>
> >>> thanks!
> >>>
> >>>
> >>>
> >>> --
> >>> Carlos Rovira
> >>> http://about.me/carlosrovira
> >>>
> >
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.


Re: [FlexJS] Stuck due to "Dictionary"

2017-02-12 Thread Harbs
I had a need for Dictionary for my purposes as well (i.e. using Objects as 
keys).

I just implemented ObjectMap which wraps Map, WeakMap and Dictionary. It falls 
back to plain objects for browsers which do not support Map and inserts uids 
into the objects.

It’s not tested yet, but it compiles. I expect to test it in the next few days.

> On Feb 10, 2017, at 1:33 AM, Alex Harui  wrote:
> 
> Also consider whether you truly need Dictionary or not.  A Weak Reference
> Dictionary of Classes, for example, is completely unnecessary if you have
> a single ApplicationDomain application.  The classes are never going to be
> unloaded, so you don't need weak references to them.
> 
> I was able to get Spark HelloWorld to run on FlexJS without using a
> Dictionary because I took some shortcuts since HelloWorld is a single SWF
> application.
> 
> Also note that, in the browsers I tested, if you put an Object as a key
> for an Object, the JS runtime seems to call toString() on it to get a key.
> And also remember that Classes and Instances are all mutable in JS so you
> can hang a UID on each instance/object to use as a key if you want.
> 
> HTH,
> -Alex
> 
> PS:  The next thing you should look for in the code is use of weak
> reference listeners.  I don't have a good answer for that.
> 
> 
> On 2/9/17, 2:23 PM, "Josh Tynjala"  wrote:
> 
>> If you only need strings as keys, then Object is the right choice.
>> 
>> JavaScript has Map and WeakMap for non-string keys, which is similar to
>> Flash Player's Dictionary:
>> 
>> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_O
>> bjects/Map
>> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_O
>> bjects/WeakMap
>> 
>> Be aware that Map and WeakMap are relatively new in JavaScript. For
>> instance, it looks like IE11 has partial support (with full support in
>> Edge), but older versions of IE can't use it.
>> 
>> - Josh
>> 
>> On Thu, Feb 9, 2017 at 2:13 PM, Carlos Rovira 
>> wrote:
>> 
>>> Hi,
>>> 
>>> we have some flash Dictionary replacement?
>>> If not what we could use instead? or what is the recommended approach?
>>> 
>>> thanks!
>>> 
>>> 
>>> 
>>> --
>>> Carlos Rovira
>>> http://about.me/carlosrovira
>>> 
> 



Re: [FlexJS] UndoManager

2017-02-12 Thread Harbs
I just committed this.

> On Feb 12, 2017, at 10:17 PM, Harbs  wrote:
> 
> I would like to add the tlf UndoManager to FlexJS Core utils.
> 
> Any objections to my doing so?
> 
> Harbs



Re: MXML Azzurro

2017-02-12 Thread Carlos Rovira
So Cool Jude,

I add to Harbs question would it work for FlexJS? That would be
awesome!! :)

2017-02-12 22:23 GMT+01:00 Harbs :

> Jude,
>
> That is way cool!
>
> What would be involved in getting it to work with FlexJS MXML?
>
> Harbs
>
> > On Feb 12, 2017, at 11:14 PM, flex capacitor 
> wrote:
> >
> > I just wanted to make the community aware of the project MXML Azzurro
> > . It's an online MXML editor, interpreter
> and
> > render that you can use to create and post MXML snippets.
> >
> > Why do this?
> >
> >   - So Flex developers can see MXML code rendered live without installing
> >   a compiler
> >   - So Flex developers can save and share MXML snippets
> >   - So non-Flex developers can see MXML syntax and rendered results
> >
> > Also, HTML markup is far behind MXML and XML in general. Not so much the
> > rendering but the markup. We need to promote something better natively
> even
> > if we are cross compiling to it. HTML doesn't have VGroups or HGroups
> like
> > Flex or simple styles like horizontalAlign or verticalAlign. They have
> > display, box-sizing, floats, shadow dom, no content fit and all of these
> > other rules to get basic functionality we get for free. They probably
> won't
> > listen but if they were wise they could use MXML (mustella, etc) as a
> > scaffold for a updated syntax and expected syntax behavior.
> >
> > If it's something that would fit on the Apache website it's welcome.
> >
> > Note:  It does not support states, declarations, css or AS3 although
> those
> > things can be added in time by myself or anyone who has access to github.
> > It has dependencies to other project libraries but with some work it can
> be
> > decoupled.
> >
> > More info here . The source is at
> > github here .
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.


Re: MXML Azzurro

2017-02-12 Thread Harbs
Jude,

That is way cool!

What would be involved in getting it to work with FlexJS MXML?

Harbs

> On Feb 12, 2017, at 11:14 PM, flex capacitor  wrote:
> 
> I just wanted to make the community aware of the project MXML Azzurro
> . It's an online MXML editor, interpreter and
> render that you can use to create and post MXML snippets.
> 
> Why do this?
> 
>   - So Flex developers can see MXML code rendered live without installing
>   a compiler
>   - So Flex developers can save and share MXML snippets
>   - So non-Flex developers can see MXML syntax and rendered results
> 
> Also, HTML markup is far behind MXML and XML in general. Not so much the
> rendering but the markup. We need to promote something better natively even
> if we are cross compiling to it. HTML doesn't have VGroups or HGroups like
> Flex or simple styles like horizontalAlign or verticalAlign. They have
> display, box-sizing, floats, shadow dom, no content fit and all of these
> other rules to get basic functionality we get for free. They probably won't
> listen but if they were wise they could use MXML (mustella, etc) as a
> scaffold for a updated syntax and expected syntax behavior.
> 
> If it's something that would fit on the Apache website it's welcome.
> 
> Note:  It does not support states, declarations, css or AS3 although those
> things can be added in time by myself or anyone who has access to github.
> It has dependencies to other project libraries but with some work it can be
> decoupled.
> 
> More info here . The source is at
> github here .



Re: [FlexJS] UndoManager

2017-02-12 Thread Harbs
In the past, I’ve used the TLF UndoManager in my projects for full undo and 
added my own IOperations.

Operations are not specific to TLF. Hence my desire to add it to Core.

I’m actually working on porting TLF for FlexJS, but I expect it will be near 
the end of the year before I have anything to commit to the project on that 
front… ;-)

> On Feb 12, 2017, at 10:46 PM, piotrz  wrote:
> 
> Hi Harbs,
> 
> I like UndoManager and I don't see anything wrong to have it in FlexJS. 
> 
> Can you share how you are going to use it in your project? Ho it will help
> you?
> 
> Thanks,
> Piotr
> 
> 
> 
> -
> Apache Flex PMC
> piotrzarzyck...@gmail.com
> --
> View this message in context: 
> http://apache-flex-development.247.n4.nabble.com/FlexJS-UndoManager-tp59260p59261.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.



MXML Azzurro

2017-02-12 Thread flex capacitor
I just wanted to make the community aware of the project MXML Azzurro
. It's an online MXML editor, interpreter and
render that you can use to create and post MXML snippets.

Why do this?

   - So Flex developers can see MXML code rendered live without installing
   a compiler
   - So Flex developers can save and share MXML snippets
   - So non-Flex developers can see MXML syntax and rendered results

Also, HTML markup is far behind MXML and XML in general. Not so much the
rendering but the markup. We need to promote something better natively even
if we are cross compiling to it. HTML doesn't have VGroups or HGroups like
Flex or simple styles like horizontalAlign or verticalAlign. They have
display, box-sizing, floats, shadow dom, no content fit and all of these
other rules to get basic functionality we get for free. They probably won't
listen but if they were wise they could use MXML (mustella, etc) as a
scaffold for a updated syntax and expected syntax behavior.

If it's something that would fit on the Apache website it's welcome.

Note:  It does not support states, declarations, css or AS3 although those
things can be added in time by myself or anyone who has access to github.
It has dependencies to other project libraries but with some work it can be
decoupled.

More info here . The source is at
github here .


Re: [FlexJS] UndoManager

2017-02-12 Thread piotrz
Hi Harbs,

I like UndoManager and I don't see anything wrong to have it in FlexJS. 

Can you share how you are going to use it in your project? Ho it will help
you?

Thanks,
Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-UndoManager-tp59260p59261.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


[FlexJS] UndoManager

2017-02-12 Thread Harbs
I would like to add the tlf UndoManager to FlexJS Core utils.

Any objections to my doing so?

Harbs


Re: Donating to Apache Flex

2017-02-12 Thread Shane Curcuru
A few clarifications on this excellent conversation from a long-time
Apache Member perspective:

Harbs  wrote earlier:
> My thoughts:
> 
> Conceptually, I like the idea of donating to projects (and in our
> case Flex). The direction of Apache seems to be moving to a more
> project-centric approach like we’re seeing with ApacheCon. That makes
> sense to me in general as Apache has grown quite a bit and
> diversified a lot in recent years. Large companies have business
> units with funds earmarked for them, and it seems logical for
> projects to have a certain level of autonomy in terms of justifying
> their own existence. (I’m not saying that every project needs to be
> “profitable”, but it also should not be shackled because it’s owned
> by the foundation.)

The ASF's mission is to provide software for the public good.  We do
that by hosting like-minded project communities.  As long as there's a
community to provide oversight for a project, we'll host them.  There's
really no thought of "profitability" ever in ASF thought.  (I think
everyone here knows that, but for the archives I wanted to provide that
reminder.)

Separately, the "Apache direction" is... not a thing.  The ASF is here
for our projects.  It's great to see a number of projects wanting to do
more - like for ApacheCon - and in particular, being *serious* and
following through on that kind of organization.

> Having earmarked money which has a foundation tax seems like a
> win-win to me. In all likelihood, project-specific donations will
> increase over-all donations to the foundation which could be very
> good to projects in particular and the foundation as a whole. Either
> way, it seems to me like a worthy experiment.

We're at a point where we're looking for new fundraising ideas that
still fit with the Apache Way and that will actually work with the all
volunteer-led governance the ASF and our projects use.  If I had to give
general advice, it would be 1) focus on getting interest for your
project, then worry about the rest, and 2) work on getting organized and
*consistent* project volunteers who will keep the work going on.  A lot
of past efforts here (or in infra) have fizzled when everyone +1'd great
ideas, but rarely showed up over the long term to actually do the work.

> 
> However, the details seem like they are pretty sticky: 1. How would
> these donations handled for a financial and technical perspective? 

Don't worry about finances, that's an ASF corporate question - to start
with, look at the directed funding proposal from the past President's
report in a board report.

> 2. How are decisions made on how to spend the money? 

For technical perspective, the PMC needs to come up with your own plan
on how to ask for, and in particular how to use any per-project funds in
a way that is fair and transparent how spending decisions are made.

> 3. What would be the guidelines on what is a “kosher” expense? 

Whatever the PMC can consistently justify as furthering the goals of the
project.  There will be a few specific restrictions that the ASF is
likely to impose, but beyond that it's up to the PMC.  One of those
rules might be not paying for donation of core development services *for
the normal coding work of the project itself*.  That is, building new
Flex modules or fixing bugs should come from people donating their time
and code, not by paying them.

> 4. Practically, what expenses do we have that would benefit from earmarked 
> donations? 

> 5. Could donations be given with the expressed desire for it to be
> used for a specific purpose? (i.e. if Acme company wants to invest
> in better docs for a project, is that okay?) 

That's mostly up to the PMC.  Note that the details at this level rely
on trust between the PMC and the donor(s), not legal agreements.


> 6. Would recognition for donations be allowed? (i.e. company logo on
> a project homepage for donations above $XX)

That's a question for fundraising@ which we'll work on when a project
comes forward with a likely donor.  The issue is ensuring that formal
recognition on project pages doesn't harm the overall Sponsorship
program, which needs to be clearly separated from this.

...snip...

On Feb 10, 2017, at 11:46 PM, Alex Harui  wrote:
...snip...

> My reasons for spending time on this are several.
> 1) The ASF is growing and so are expenses. Expenses rarely change based
> on the economy, but donations can. If a time ever comes to discuss
> cutting expenses, I want to protect Flex by being able to make a case that
> we don't cost the ASF any money and in fact, help.
> 2) We should be donating money to the ASF, but how many of you do? I
> don't myself. And would it be easier to justify if the money went
> directly to Flex? It would for me.

I don't donate personally, because I spend so much of my own unpaid time
working on Apache governance: my job has been wholly unrelated to ASF
work for a dozen years.  And I don't think we should 

Re: Donating to Apache Flex

2017-02-12 Thread Harbs

> On Feb 12, 2017, at 2:16 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> The direction of Apache seems to be moving to a more project-centric 
>> approach like we’re seeing with ApacheCon.
> 
> Not sure that's case, for instance the other streams include Cloud, Big Data 
> and IoT which involve multiple projects. The IoT stream is likely to involve 
> a dozen or so projects. If we can band tonight with other projects for a 
> steam/summit we're are more likely to attract more speakers, attendees etc. 
> The ASF has talked about a 50 year plan. It's not expected that the projects 
> that exist today will exist in 50 years.
> 
>> We could also benefit from conferences/hackathons.
> 
> The best way to do this is to submit talks to conferences (which I know there 
> has been some success at) - and promote the ApacehCon FlexJS summit :-)

Sure, and I’m going to make an effort to be there. But ApacheCon is once a year 
(possibly twice?) If we could help arrange smaller get-togethers around the 
world, it would likely be productive.


>> Of course this goes into the question of #3 and #5. AFAIK, paying for 
>> professional services is currently a major no-no.
> 
> I think that’s set in stone and isn't not possible. See the minutes in that 
> board report for instance, but it doesn’t stop other companies hiring people 
> and paying them to do the work. 

I realize this. I’m just raising the question as to whether things might 
change. What’s the reason for the current rule? Would the reasons be mitigated 
if projects raise funds?

I’m trying to put out food for discussion. I don’t have an opinion yet on these 
issues.

Harbs

Re: Donating to Apache Flex

2017-02-12 Thread Justin Mclean
Hi,

> The direction of Apache seems to be moving to a more project-centric approach 
> like we’re seeing with ApacheCon.

Not sure that's case, for instance the other streams include Cloud, Big Data 
and IoT which involve multiple projects. The IoT stream is likely to involve a 
dozen or so projects. If we can band tonight with other projects for a 
steam/summit we're are more likely to attract more speakers, attendees etc. The 
ASF has talked about a 50 year plan. It's not expected that the projects that 
exist today will exist in 50 years.

> We could also benefit from conferences/hackathons.

The best way to do this is to submit talks to conferences (which I know there 
has been some success at) - and promote the ApacehCon FlexJS summit :-)

> Of course this goes into the question of #3 and #5. AFAIK, paying for 
> professional services is currently a major no-no.

I think that’s set in stone and isn't not possible. See the minutes in that 
board report for instance, but it doesn’t stop other companies hiring people 
and paying them to do the work. 

Thanks,
Justin



Re: Donating to Apache Flex

2017-02-12 Thread Harbs
My thoughts:

Conceptually, I like the idea of donating to projects (and in our case Flex). 
The direction of Apache seems to be moving to a more project-centric approach 
like we’re seeing with ApacheCon. That makes sense to me in general as Apache 
has grown quite a bit and diversified a lot in recent years. Large companies 
have business units with funds earmarked for them, and it seems logical for 
projects to have a certain level of autonomy in terms of justifying their own 
existence. (I’m not saying that every project needs to be “profitable”, but it 
also should not be shackled because it’s owned by the foundation.)

Having earmarked money which has a foundation tax seems like a win-win to me. 
In all likelihood, project-specific donations will increase over-all donations 
to the foundation which could be very good to projects in particular and the 
foundation as a whole. Either way, it seems to me like a worthy experiment.

However, the details seem like they are pretty sticky:
1. How would these donations handled for a financial and technical perspective?
2. How are decisions made on how to spend the money?
3. What would be the guidelines on what is a “kosher” expense?
4. Practically, what expenses do we have that would benefit from earmarked 
donations?
5. Could donations be given with the expressed desire for it to be used for a 
specific purpose? (i.e. if Acme company wants to invest in better docs for a 
project, is that okay?)
6. Would recognition for donations be allowed? (i.e. company logo on a project 
homepage for donations above $XX)


Re: Infra. Chris has some good points, but the pain points that Alex brings up 
are real. Finds don’t necessarily mean that we need to run the infrastructure 
ourselves. There’s no reason why project funds cannot go to Infra to pay for 
resources that Infra can not otherwise justify. That would give us the best of 
both worlds: we are guaranteed the resources we need, while not having to 
manage them. Of course, if a project would feel the need to manage something on 
their own, I see nothing wrong with that.

Re: #4 I think we could REALLY benefit from professional documentation and 
possibly design. We could also benefit from conferences/hackathons. Of course 
this goes into the question of #3 and #5. AFAIK, paying for professional 
services is currently a major no-no. The question to me is whether that’s 
something that’s set in stone or not.

I think things when they go down this track can spiral pretty quickly. I’m not 
saying we shouldn’t try this, but we need really clear guidelines fro the board 
on which steps to take, and when…

> On Feb 10, 2017, at 11:46 PM, Alex Harui  wrote:
> 
> Hi,
> 
> In case you were wondering, Apache Flex and the entire Apache Software
> Foundation and the other 300+ ASF projects are funded by generous
> donations.  Some donations are in terms of people:  I get paid by Adobe to
> work on Apache Flex but Adobe doesn't write a check to the ASF
> specifically for other costs of hosting Apache Flex.  But some companies
> and individuals do write checks to the ASF.  Big donations are termed as
> sponsorships and those folks are recognized here [1].  This money pays for
> servers that host Git, manage mailing lists, host our website, distribute
> releases, and pays for accountants, legal and PR people, among other
> things.
> 
> All projects are encouraged to encourage its users to donate to the ASF.
> On our website [2], we have the "About Apache" menu item that has the
> "Donation" option that takes you to [3].
> 
> Historically, any donations could not be "directed" or "targeted".
> Instead any money you donate to the ASF goes into the general fund and is
> used however the Apache board sees fit.  There was no way to specify that
> the money you want to donate should be used to help Flex.
> 
> However, in January 2015, the board decided to entertain proposals for
> directed donations.  No project has made a proposal so far, but I want to
> see if our community is interested in proposing the following:
> 
> The Summary:  I want to see if we can get enough donations from the
> community to pay for all costs of having Flex at Apache.
> 
> How much money that is isn't clear.  My guess is that Flex is a
> below-average consumer of ASF resources.  Our share of the costs could be
> as little as $1000/year.
> 
> My reasons for spending time on this are several.
> 1) The ASF is growing and so are expenses.  Expenses rarely change based
> on the economy, but donations can.  If a time ever comes to discuss
> cutting expenses, I want to protect Flex by being able to make a case that
> we don't cost the ASF any money and in fact, help.
> 2) We should be donating money to the ASF, but how many of you do?  I
> don't myself.  And would it be easier to justify if the money went
> directly to Flex?  It would for me.
> 3) I am currently paying for one of our CI servers.  If we could get
> directed donations to pay for it, 

[FlexJS] Layout Problem

2017-02-12 Thread yishayw
Can you confirm the fix proposed in [1] ?

It'll have to be done in layouts other than BasicLayout.

[1] https://issues.apache.org/jira/browse/FLEX-35263



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Layout-Problem-tp59255.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Spacers and positioning

2017-02-12 Thread Harbs
Documentation is the key. I don’t know what to say, but we need a solution to 
that problem.

The current BasicLayout seems to be pretty inefficient as-is for HTML layout. 
It currently runs layout twice, and we observed some pretty extreme delays in 
laying out lists. For example, a list with close to 400 items (simple strings) 
took about a full second to redraw. We have not spent the time figuring out why 
it’s so slow.

It would be an interesting exercise to create a ConstrainedLayout which would 
basically be a port of the Flex layout and compare  the performance between the 
two. We very well might do that…

Harbs

> On Feb 12, 2017, at 8:55 AM, Alex Harui  wrote:
> 
> In the current layouts, %width works the way it does in the browser and
> not the way it did in Flex.  Where should we document that so folks find
> it easily?
> 
> If someone wants to port the Flex layouts that's fine with me.  They will
> be at least twice as slow, if not more, but that's PAYG for you.
> 
> I think you might be able to use Spacer as the FlexibleChild in
> OneFlexibleChildHorizontalLayout
> 
> And we want the recommended JS patterns to work.  Nice to know that you
> got position:absolute;right:0px; to work.  Supposedly "float: right" will
> work as well, but I don’t think the SWF side supports that.
> 
> We are in the business of finding common patterns and encapsulating them.
> So, it is totally within the FlexJS philosophy to have a bead called a
> RightAlignBead that injects position:absolute;right:0px; into the styles
> block.  There is probably some trickiness to dealing with conflicts if the
> styles are also being set in some other way, but then you could do:
> 
> 
> 
>  
>
>  
> 
> 
> I'm not sure I understand the last code snippet, but there is no reason
> not to create a 4ColumnLayout.  We have a VerticalColumnLayout already.
> Find the pattern and encapsulate it so others can use it.  Try to keep it
> small and loosely coupled.
> 
> My 2 cents,
> -Alex
> 
> On 2/11/17, 10:07 PM, "Harbs"  wrote:
> 
>> Currently, the best you can do to spread elements in FlexJS is by using
>> OneFlexibleChildVerticalLayout and OneFlexibleChildHorizontalLayout.
>> 
>> The more we use FlexJS, the more we’re coming to the conclusion that we
>> really need a ConstrainedLayout which has the features of the classic
>> Flex layout…
>> 
>> Harbs
>> 
>>> On Feb 12, 2017, at 4:46 AM, Justin Mclean 
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> An old trick to get things to be pined to the RHS was to use a 100%
>>> spacer in MXML.
>>> 
>>> However code like this doesn’t work in FlexJS:
>>> 
>>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>> But in FlexJS the spacer is 100% of the containers width and the button
>>> wraps onto the next line.
>>> 
>>> You can do this but is seems bit cumbersome:
>>> 
>>> 
>>>   
>>>   
>>> 
>>> 
>>> And a little more cumbersome once you have several items you want to
>>> evenly space.
>>> 
>>> 
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>> 
>>> 
>>> Is there a better way of doing this?
>>> 
>>> Thanks,
>>> Justin
>>> 
>> 
> 



Re: [FlexJS] Uncaught type exception

2017-02-12 Thread piotrz
Alex,

In case of raised jira by Justin - do you think that bug is inside compiler
or do you want me to look into that?

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-Uncaught-type-exception-tp59245p59253.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Uncaught type exception

2017-02-12 Thread Justin Mclean
Hi,

> Binding works mostly.  It looks like the generated code might need a
> try/catch.  File a bug.

https://issues.apache.org/jira/browse/FLEX-35262 


> Yes, that is probably the case.  If your properties are being applied to
> objects being created later you may have to defer the application of those
> properties.  That was true in regular Flex as well.

Code like this would work in regular Flex so there may be a little more going 
on here.

Thanks,
Justin