Should Assignments be conditionals? Warnings in Flash Builder.

gingerman's Avatar

gingerman

23 Mar, 2014 11:14 PM

In these classes
robotlegs.bender.extensions.localEventMap.impl.EventMap and also robotlegs.bender.framework.impl.MessageDispatcher
…there are some assignments within conditionals.
Are these supposed to be like that ?

Error ( Did you mean == instead of =? )
Line 127 while (eventConfig = currentListeners.pop())

  1. Support Staff 1 Posted by creynders on 24 Mar, 2014 08:35 AM

    creynders's Avatar

    Yes, they are meant to be like that. It's shorthand.
    With which compiler are you getting the warnings? ASC 2.0?

  2. Support Staff 2 Posted by Ondina D.F. on 24 Mar, 2014 08:53 AM

    Ondina D.F.'s Avatar

    Hello,

    I guess the old AS3 compiler understands that
    while (eventConfig = currentListeners.pop())
    is the equivalent of
    while ( ( eventConfig = currentListeners.pop() ) !=null )

    Are you using Flex and are you compiling against the rl source using the new ASC2?
    If the answer is yes, have you tried compiling using the SWC?

    See these issues on github:
    https://github.com/robotlegs/robotlegs-framework/issues/111
    https://github.com/robotlegs/robotlegs-framework/issues/154

  3. 3 Posted by gingerman on 24 Mar, 2014 10:04 AM

    gingerman's Avatar

    I use Flash Builder 4.7 using AIR SDK 4.0 ( I'm unsure what compiler that is, I'll look up how to find that out later when I have a moment ).

    This is not causing me a great problem, I am only getting warnings - I know that it's actually valid code, although I would say that for the sake of either a comment saying ( this is supposed to be like this ), or a little extra code to make it obvious what's going on and that it is intentional - I think it is worth doing.

    Thanks so much for your replies.

  4. Support Staff 4 Posted by Ondina D.F. on 02 Apr, 2014 11:32 AM

    Ondina D.F.'s Avatar

    Glad we could help:)
    I guess this is resolved? I'm going to close this discussion, but you can re-open it, if need be.

  5. Ondina D.F. closed this discussion on 02 Apr, 2014 11:32 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac