13 Replies Latest reply on Jun 9, 2011 6:09 AM by david_mtl

    This bug is killing me, Help !!!

    david_mtl

      I'm dealing with the migration from flex3 (sdk3.5) to flex4.5 (sdk4.5), i corrected some errors then boom, the compiler indicates this error:
       

      Description Resource Path Location Type
      macromedia.asc.parser.CallExpressionNode cannot be cast to macromedia.asc.parser.GetExpressionNode     contact_detail Unknown Flex Problem

      Workaround :
      I found in some forums the solution of adding the -keep-generated-actionscript compiler argumen, but unfortunately nothing changed.

      This bug is really killing me, any ideas will be appreciated.

      Thanks,
      --
      David

        • 1. Re: This bug is killing me, Help !!!
          Flex harUI Adobe Employee

          Not sure, but I'd guess that some SWCs in your project are not built on Flex 4.5

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: This bug is killing me, Help !!!
            david_mtl Level 1

            Hi Alex,

             

            thanks for your prompt reply, I checked all the SWCs and they are generated by sdk4.5

            I can not really find out this error, it's killing me

             

            Sans titre.png

             

             

            Is there any other suggestion?

             

            Thank you a lot in advance.

             

            --

            David

            • 3. Re: This bug is killing me, Help !!!
              Flex harUI Adobe Employee

              Try a new simple project just to make sure it isn't an install issue.

              • 4. Re: This bug is killing me, Help !!!
                GordonSmith Level 4

                Is there any information about where the problem is in contact_detail?

                 

                - Gordon

                • 5. Re: This bug is killing me, Help !!!
                  GordonSmith Level 4

                  My theory is that some AS you've written in contact_detail that didn't confuse the old compiler now confuses the new compiler. If there is no location information, then you're going to have to figure out where it is the hard way, such as by stubbing out method bodies one at a time to determine where the problem is.

                   

                  Gordon Smith

                  Adobe Flex SDK Team

                  • 6. Re: This bug is killing me, Help !!!
                    david_mtl Level 1

                    Hi Gordon,

                     

                    > Is there any information about where the problem is in contact_detail?

                     

                    This is the problem, that we don't have any information about the error location. It's an unknown flex problem.

                     

                    I'll stub out method bodies one at the time, i don't have choice. I'll keep you posted anyway.

                     

                    Thanks a lot

                     

                    --

                    David

                    • 7. Re: This bug is killing me, Help !!!
                      david_mtl Level 1

                      Hi again,

                       

                      Finally  , after a whole day of work , i find out that this message is caused by those two lines in different files, the parts of code are:

                       

                       

                       

                      <mx:Repeater id="myrep" dataProvider="{groupExtendedVO.childrenList}"> 
                           <mx:HBox paddingLeft="6" height="25" width="100%" styleName="{myrep.currentIndex.valueOf() % 2 == 0?'greyRowBG':'whiteRowBG'}" paddingTop="4" verticalAlign="middle">
                                <mx:Text width="100%" height="25" text="{myrep.currentItem.contact.firstNm + ' ' + myrep.currentItem.contact.lastNm}" toolTip="{myrep.currentItem.contact.firstNm + ' ' + myrep.currentItem.contact.lastNm}" styleName="greyText" useHandCursor="true"/>
                           </mx:HBox>
                      </mx:Repeater>
                      

                       

                       

                       <mx:Repeater id="navControlRepeater" dataProvider="{objectivesList}">
                                           <mx:HBox styleName="questionShortcut" paddingLeft="1">
                                             <mx:Canvas  id="itemShortCut" styleName="{navControlRepeater.currentIndex==currentItemIndex?'questionNavPanelSelected':'questionNavPanel'}" width="100%" height="100%" >
                                                          <mx:Label  truncateToFit="false" text="{'Objectif '+(navControlRepeater.currentIndex.valueOf()+1)}" 
                                                            click="scrollToIndex(event.target.instanceIndices);" 
                                                            mouseOver="onSelectOver(event.target.instanceIndices);"
                                                            mouseOut="onSelectOut(event.target.instanceIndices);"
                                                            paddingLeft="2" paddingRight="2" height="18" textAlign="center"
                                                            useHandCursor="true" buttonMode="true" fontFamily="Tahoma" fontWeight="bold"
                                                         mouseChildren="false"/>
                                            </mx:Canvas>
                                     </mx:HBox>
                       </mx:Repeater>
                      

                       

                      The two line wich cause the problem are :

                       

                      styleName="{myrep.currentIndex.valueOf() % 2 == 0?'greyRowBG':'whiteRowBG'}"
                      

                       

                      styleName="{navControlRepeater.currentIndex==currentItemIndex?'questionNavPanelSelected':'questionNavPanel'}"
                      

                       

                       

                      By removing the two lines above, the problem is resolved.It's like related to the valueOf property, i'm not sure.

                      Anyone have met a similar problem or have an explanation ?

                       

                       

                      Thanks a lot in advance.

                       

                       

                      --

                      David

                      • 8. Re: This bug is killing me, Help !!!
                        GordonSmith Level 4

                        > Only the red parts are causing the trouble !

                         

                        I don't see any red parts.

                         

                        > It's like related to the valueOf property.

                         

                        I don't see any reason to be calling valueOf(). Try removing it and just doing

                         

                            myrep.currentIndex % 2

                         

                        Gordon Smith

                        Adobe Flex SDK Team

                         

                        • 9. Re: This bug is killing me, Help !!!
                          GordonSmith Level 4

                          I see the red parts now. Sorry about that.

                          • 10. Re: This bug is killing me, Help !!!
                            GordonSmith Level 4

                            Hmmm... only one of the two problems invovles valueOf(). I'm not sure what to do about the other.

                             

                            Gordon Smith

                            Adobe Flex SDK Team

                            • 11. Re: This bug is killing me, Help !!!
                              GordonSmith Level 4

                              Maybe the compiler you upgraded to has a bug related to binding expressions involving the currentIndex property of Repeater (which I believe requires special compiler support). You may have to take out the binding expression that sets styleName to colorize the repeated objects in an AS loop instead.

                              • 12. Re: This bug is killing me, Help !!!
                                GordonSmith Level 4

                                Can you please file a bug at http://bugs.adobe.com/jira so that we can track this regression that didn't get caught between 3.5 and 4.5?

                                 

                                Gordon Smith

                                Adobe Flex SDK Team

                                • 13. Re: This bug is killing me, Help !!!
                                  david_mtl Level 1

                                  Hi,

                                   

                                  It's already done Gordon, Thank you for your help.

                                   

                                  --

                                  David