flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: [FlexJS][Maven] Build failure caused by compiler warnings (was: Re: [FlexJS] How Binding works?)
Date Fri, 09 Dec 2016 19:54:42 GMT
The maven build will not fail because of this. All it does is output warnings.

If it does fail, this is definitely something we need to fix.

Chris


Am 09.12.16, 19:50 schrieb "Alex Harui" <aharui@adobe.com>:

    
    
    On 12/9/16, 10:25 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
    <carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:
    
    >You're right, compile is working, but message was confused (BUILD FAILURE)
    >
    >Maybe Chris could help with this?
    
    Well, I'm sure he can, but Chris did want our stuff to compile without
    warnings, so I think he set Maven to fail on warnings.  I'm fine with that
    rule:  we should have ways to suppress warnings individually because
    sometimes a warning is important.
    
    The binding warning is legitimate.  It says that there aren't change
    events for data.foo.  That could bite you some day, but is ok in this
    particular situation.  The "correct" answer is to use ValueObjects and
    cast the data binding expression as I showed, but that can be a pain for
    prototyping.  It turns out that with FlexJS, you can suppress this binding
    warning for simple binding expressions by making a fake ValueObject with
    the required properties and casting.  The data binding code doesn't
    type-check so you can get away with it.  I just pushed a prototype of an
    ASDoc app with a fake ValueObject and suppressed warnings via casting in
    the SummaryRenderer.mxml and DetailRenderer.mxml
    
    HTH,
    -Alex
    
    
    >>>
    >> >The project 'App' has been successfully compiled and optimized.
    >> >/Users/carlosrovira/Dev/Flex/source/flexjs/flex-asjs/
    >> examples/flexjs/MDLEx
    >> >ample/src/main/flex/itemRenderers/CustomListItemRenderer.mxml(28):
    >> >col: 12 Data binding will not be able to detect assignments to 'label'.
    >> >text="{data.label}" >
    >> >           ^
    
    

Mime
View raw message