Flex 3 to Flex 4 Migration – 2

April 28, 2011

Uh-oh.  Big problem with charts going from Flex 3 to Flex 4: ColumnSeries displayName is not showing up.

Flex 3 (displayName showing)

Using the Flex 4.1 SDK, the labels don’t show:

Flex 4.1 - displayName doesn't show

I spent hours upon hours trying to see if something in my code was working differently, looking at the API documentation… maybe some small change was made and my code needs to work a bit differently?

In the shower this morning, an idea appeared, like a nagging little itch: what if the problem is a bug in the Flex SDK?  So, I installed Flex 4.5.0.19786, re-compiled and – problem solved!  Whew.  I’m relieved.  Not being able to show labels on the stacked columns would be a deal-killer and we’d have to move back to Flex 3.5.


Flex 3 to Flex 4 Migration – 1

April 21, 2011

This is a technical diary, short entries tracking the migration of the Vaccine Ingredients Calculator from Flex 3 to Flex 4: a non-trivial effort that I’m approaching with both excitement and trepidation.

I’ve been meaning to start this project for the past 6 months, but there has been too many enhancements that I’ve wanted to roll into the VIC.  Then, a few days ago, I found a good article on migrating flex apps and, after deploying a new version of the VIC today, figured that the time was right to begin.

The VIC is hosted on Google Code and stored in svn.  So the first thing I did was to create a new branch called flex4 from within subclipse.  Next, I changed the VIC’s Flex SDK version to 4.1 (in Flex compiler properties).  The change generated 28 errors and 14 warnings.  The errors were all related to style attributes:

Initially, this made my stomach turn; I didn’t understand what it meant.  Its a result of a big change made in the Spark component architecture pertaining to how styling and skinning is done (see video tutorial “Introducing Flex components and controls” on this page for a good overview.)  Fortunately, these errors can be fixed with no coding changes by choosing the Halo theme:

All compile errors are gone, but I’m left with 66 warnings to work through.  I did a quick check: the VIC runs but there are some problems; however, all 459 of our FlexUnit tests run successfully.  This is enough for today.


Follow

Get every new post delivered to your Inbox.