Select to view content in your preferred language

Migrating infopopup (in a NON-SFV app) to use Flex 4 SDK

639
1
11-11-2010 11:42 AM
CarmenDurham
Frequent Contributor
Hello all!

I have a non-SFV app that I have migrated for use in Flash Builder 4. I have fixed everything to work with API 2.0. Switched the "theme" to use Halo to get it to run. That was pretty easy.

Delving into the next step in the Migrating document: Upgrading to use FLEX 4 SDK. I have already changed the namespaces in the main application.mxml and now working through some of the components and that is where I am hitting problems leading to these questions.

1) I hit an error after changing the namespaces in the component InfoPopup.mxml that I can't figure out how to fix. The error is:
"State overrides may not longe be explicitly declared....." Here is what that section looks like (this InfoPopup is pretty much like the one from SFV 1.3) :
 <mx:states>
error is here <mx:State name="regLeft">
   <mx:SetProperty target="{infoContainer}" name="height" />
   <mx:SetProperty target="{infoContainer}" name="width" />
   <mx:SetProperty target="{infoGlow}" name="visible" value="true"/>
   <mx:SetProperty target="{infoIcon}" name="visible" value="true"/>
   <mx:SetProperty target="{infoRule}" name="visible" value="true"/>
   <mx:SetProperty target="{infoTitle}" name="visible" value="true"/>
   <mx:SetProperty target="{infoContent}" name="visible" value="true"/>
   <mx:SetProperty target="{infoCanvas}" name="width" value="211"/>
   <mx:SetProperty target="{imageLabel}" name="width" value="200"/>
  </mx:State>
other error is here <mx:State name="regRight" basedOn="regLeft">
   <mx:SetProperty target="{infoCanvas}" name="x" value="0"/>
   <mx:SetProperty target="{infoRule}" name="x" value="200"/>
   <mx:SetProperty target="{infoGlow}" name="x" value="200"/>
   <mx:SetProperty target="{infoIconCanvas}" name="x" value="220"/>
  </mx:State>
 </mx:states>
  


2) Should I even bother with switching all the namespaces for SDK 4? What will I gain with Spark? I'm confused about mixing halo and spark. If the namespaces are changed in some components but not others, will that cause problems later on? I already noticed the slider bar for transparency between two cached services isn't working, but other stuff works fine. Any advice is welcome from the ESRI perspective.


Thanks,
Carmen
Tags (2)
0 Kudos
1 Reply
CarmenDurham
Frequent Contributor
This document helped solve the issue with states and some other questions I had.

http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html

Although, the confusion of what needs to be changed to "s:", "fx:" or stay as "mx:" is still lurking.  If anyone has found any more helpful documents (especially related to ESRI related apps), please send.

I may just keep the "problem" component as using the old 2006 namespace and leave it at that for now. Especially after I looked at the new 2.1 FlexViewer's infopopup.mxml for reference and noticed that it has totally changed from 1.3's infopopup.mxml which is what my non-SFV infopopup was based on. 

Thanks,
Carmen
0 Kudos