Re: [flexcoders] getting the sum of values in list datafield.

2014-08-29 Thread Scott Fanetti scott.fane...@gmail.com [flexcoders]
IMHO - you should create a separate bindable string and set the value to that 
instead of directly setting the .text property of a text field.  Your reduce 
function seems ok - just run each object through the filter function to see if 
it returns true. Only objects that return true should be added to the sum. 

You are 99% of the way there.  What is tripping you up? 

Sent from my iPhone

> On Aug 29, 2014, at 4:55 AM, "stinas...@yahoo.com [flexcoders]" 
>  wrote:
> 
> Hello, i have a flex list that is populated by an arraycollection. in the 
> arraycollection i have a field subTotal and i would like to calculate the 
> subtotals from that field and pin them to a text component and i would like 
> to do that even when the list is filtered. below is my code
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical"
> width="100%"
> height="100%"
> verticalAlign="top"
> verticalGap="0"
> paddingTop="0"
> paddingBottom="0"
> paddingLeft="0"
> paddingRight="0"
> xmlns:ns1="ascript.*"
> creationComplete="init()"
> initialize="initDate()"
> xmlns:ns2="components.*">
> 
> 
> 
> 
> 
> 
> 
>   destination="ColdFusion"
>  source="moRentals.src.CFCs.crud"
>  showBusyCursor="true"
>  
> fault="CursorManager.removeBusyCursor();Alert.show(event.fault.message)">
> 
> result="expenseResult(event)"/>
> 
> 
> 
>precision="0"
>   thousandsSeparatorTo=","
>   useThousandsSeparator="true"
>   rounding="up"
>   currencySymbol="UGX "/>
> 
>formatString=" DD, "/>
> 
>   width="100%"
>  height="50"
>  verticalAlign="middle"
>  verticalGap="0">
> 
> 
> 
> 
> 
> 
>   height="100%"
>  horizontalGap="0">
>   height="100%"
>  verticalGap="0"
>  backgroundColor="#818284"
>  horizontalAlign="center">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   backgroundColor="#FF"
>  verticalGap="0">
> 
> 
>   paddingLeft="40"
>  paddingRight="45"
>  verticalAlign="middle"
>  height="66">
> 
>styleName="listLabel"/>
>change="expenseAr.refresh();"/>
>styleName="listLabel"/>
>change="expenseAr.refresh();"/>
> 
> click="createdaddPopup()"/>
> 
> 
> 
> 
> 
> 
>   paddingLeft="40"
>  paddingRight="46"
>  verticalAlign="middle"
>  height="36">
> 
>width="120"
>   styleName="listLabelHeading"/>
>width="90"
>   styleName="listLabelHeading"/>
>width="130"
>   styleName="listLabelHeading"/>
>width="90"
>   styleName="listLabelHeading"/>
>width="90"
>   styleName="listLabelHeading"/>
>width="90"
>   styleName="listLabelHeading"/>
> 
> 
> 
> 
> 
>   width="100%"
>  dataProvider="{expenseAr}"
>  itemRenderer="renderers.expenseListRenderer"
>  selectedIndex="0"
>  height="100%"
>  paddingBottom="0"
>  borderSkin="{null}"/>
>   backgroundColor="#0F76BB"
>  height="35"
>  verticalAlign="middle"
>  paddingLeft="20"
>  paddingRight="20">
> 
> 
> 
> 
>  

Re: [flexcoders] Re: Future Scope of Flex

2014-08-18 Thread Scott Fanetti scott.fane...@gmail.com [flexcoders]
Wow - I really don't think this is the forum for character assassination. I've 
been a polyglot developer and architect for 20 years.  One thing in technology 
is constant - that is change.  

Adapt.  It is childish to cling to a technology like a fanboy.  

Dynamic languages use different paradigms than strongly typed languages.  In 
these contexts functional styles and extension through composition are favored 
over extension through inheritance.  But these are all just tools for 
communication between the dev and the user.  

The users have chosen a route that no longer needs flex/flash. That is neither 
good nor bad - it just is.  

You may dislike parts of technology A and think it's inferior to technology B - 
but have you considered the notion that possibly you may be trying I hammer 
nails with a saw? You may dislike that JS does not have the type safety of AS. 
But if you are relying on type checking you are missing the boat. The compiler 
can't check if your logic is bad. It can only check that something like tab a 
is in slot b. 

You still have to unit test. All the skills you bring to solve a problem are 
only marginally helped by the compiler bitching that a class does not have a 
method to support an interface.  There is nothing inherently bad about 
prototypical inheritance as opposed to class based inheritance. As a matter of 
fact you typically don't need to use inheritance in JS.  

Tell me - is it cleaner to devolve functionality into representations that can 
be decorated onto any object - and you test the functionality itself? Or to 
HAVE to inherit from class A in order to get the features if class A? You can't 
do multiple inheritance in AS - so you have to hack around with interfaces and 
utils or you must repeat yourself.  

In JS - just decorate what you need with what you need it to do.  

It's all good bro. I'm just saying that as a seasoned flex dev that feared 
moving to JS - in my experience - it was an easy transition.  But whatever. 
Have a great day!

And I accept the apology you certainly forgot to add by calling me a manager 
:). I realize it's hard to be civil when someone is wrong on the internet.  

Sent from my iPhone

> On Aug 18, 2014, at 9:50 AM, "danielpr...@yahoo.com [flexcoders]" 
>  wrote:
> 
> > js is almost exactly like Actionscript.
> 
> Typical of a JS advocate, no real knowledge of object oriented structures and 
> concepts. Bet this is by another manager type that doesn't know an array from 
> a variable (actually that WOULD be the same level of knowledge in this case 
> wouldn't it.)
> 


Re: [flexcoders] Re: Future Scope of Flex

2014-08-16 Thread Scott Fanetti scott.fane...@gmail.com [flexcoders]
I built the Rosetta Stone user interface in flex and the EA Pogo flex games 
interface and online store were also built by me. I was using flash when it was 
the Futuresplash player. I was a very early adopter. 

Adobe F'd it in the A  by mismanaging the technology that WAS really great.  
But - time goes on and you change technologies.  I wrote a ton of Lingo in 
director too - along with vbscript for IE only interfaces. I've had my share of 
dead end technologies.  Technologies rise and fall - a good dev realizes it's 
all pretty much the same from tech to tech - the syntax changes but the 
patterns are transferable. 

Now though - there is no justifiable reason to do any development in flex.  
Adobe has given up on it. It is not going to be a viable platform for the 
future.

Luckily - js is almost exactly like Actionscript. Anybody that is good at AS 
can write JS in no time. 

Sent from my iPhone

> On Aug 16, 2014, at 8:22 PM, "danielpr...@yahoo.com [flexcoders]" 
>  wrote:
> 
> I notice you don't compare it to your prior experience developing user 
> interfaces in flash?
> 
> 


[flexcoders] Re: Future Scope of Flex

2014-08-16 Thread Scott Fanetti scott.fane...@gmail.com [flexcoders]
Technologies come and go. When I was a kid - the coolest thing in the world was 
the NextStep computer. It died but eventually reemerged as the Mac OS. 
Languages come and go as well. Flex and AS were great for a time - but the 
proprietary nature of the language killed it a few years ago.  The web in 
general has moved away from plugin based interfaces.  As standards have come 
together - the browser makes have adopted js as the language of choice with 
CSS/HTML for templates and styles. 

That's not something to fear - that's just the way technology works. It's a 
tool.  

JS is easy to learn - so learn it.  The tools available today in various 
platforms are easy to pick up as well. JS has some truly great parts - like 
promises - that were never really implemented in Flex/flash.  

I think it's a good idea as a dev to always keep learning.  It doesn't matter 
that tech A is killed by tech B --- if you keep learning you will always have a 
job. 

Sent from my iPhone