Payday Loans Online Payday Loans Online

Todd Rothe : UI/UX Developer

it's pronounced rowth-ee

By 2g1c2 girls 1 cup

Flex 3 to Flex 4 Migration Chronicles: I

This is the first in a series of posts which chronicle the issues I ran into while migrating a client’s app from the Flex 3.5 SDK to the Flex 4.0 SDK

Error: “The style ‘borderThickness’ is only supported by type ‘mx.containers.Canvas’ with the theme(s) ‘halo’.”

Goal: Match the existing Flex 3 implementation (and design comps) which displays a container with a border stroke 4 px wide.

Flex 3 code :
< mx:Canvas width="100" height="100" borderStyle="solid" borderColor="0x000000" backgroundColor="0xFFFFFF" borderThickness="4"/>

Attempt 1: Tried adding compiler arg ‘-theme {FlexLibs}/flex_sdk_3.5/frameworks/themes/HaloClassic/haloclassic.swc’.

Result 1: This only created more errors : The style __________ is only supported by type ‘mx.containers.Canvas’ with the theme(s) ‘halo, spark’. Turns out that the ‘haloclassic’ theme from SDK 3.5 doesn’t qualify as ‘halo’ in this case.

Attempt 2: Tried adding compiling arg ‘-theme {FlexLibs}/flex_sdk_4.0/frameworks/themes/Halo/halo.swc’.

Result 2: Qualified success. The error is gone, but when a Spark component is added to the stage the same error appears only it references the new spark component and indicates the lack of ” the theme(s) ‘spark’. ”

Attempt 3: Changed the < mx:Canvas borderThickness="4"> into < s:BorderContainer borderWeight="4">

< s:BorderContainer width="100" height="100" borderStyle="solid" borderColor="0x000000" backgroundColor="0xFFFFFF" borderWeight="4"/>

Result 3: Success! No more error and the BorderContainer satisfies the design requirements of a container with a border stroke 4 px wide.

* The errors chronicled in this series can be recreated by copying working code from within Flex 3 Application tags
< mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
< strong>here
< /mx:Application>

and pasting it between Flex 4 Application tags
< s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
< strong>here
< /s:Application>

 

No Responses to “Flex 3 to Flex 4 Migration Chronicles: I” (post new)

 

Leave a Reply

You must be logged in to post a comment.