Flex Viewer and FlashBuilder 4

751
4
04-15-2010 07:52 AM
HeatherHainsworth
New Contributor
Ok so I am in the midst of getting a proper Flex Builder/Flash Builder License.

I have a Trial of Flex Builder 3 which doesn't allow me to use the charts extension and I can't find the extension to download anymore because Flash Builder 4 has been released now.

so I downloaded Flash Builder 4, but none of the chart functionality is working now. For that matter neither are any of my line symbols (but I just changed all of the symbology to remove outlines).

I need the charts to work though.

This is the error I get:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.charts.chartClasses::CartesianChart/updateMultipleAxesStyles()
at mx.charts.chartClasses::CartesianChart/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()


And it fails on the CartesianChart.as Action Script Line: var hslen:uint = hsNames.length;

Which falls within this function...
private function updateMultipleAxesStyles():void
    {
        var hsNames:Array /* of String */ = getStyle("horizontalAxisStyleNames");
        var vsNames:Array /* of String */ = getStyle("verticalAxisStyleNames");
       
        var n:uint = _horizontalAxisRenderers.length;
       
        var hslen:uint = hsNames.length;
        var vslen:uint = vsNames.length;
       
        for (var i:int = 0; i < n; i ++)
        {
            if (_horizontalAxisRenderers is DualStyleObject)
            {
                DualStyleObject(_horizontalAxisRenderers).internalStyleName =
                    hsNames[i % hslen];
            }
        }

What can I do to fix this? I tried downloading the beta 2 ArcGIS Flex SWC that didnt' seem to help or do anything. I saw a post about downloading a different Flash Sdk but the build that was suggested was no longer on line either.

I am at a lost and need help as I have very few days left before I need this application for a presentation.

Thanks
Heather
Tags (2)
0 Kudos
4 Replies
DasaPaddock
Esri Regular Contributor
Since you're using the Flex Viewer, you'll need to keep using the 1.X version of the API. You can use FB4, but you'll need to change the project settings to use the Flex 3.5 SDK.
0 Kudos
HeatherHainsworth
New Contributor
Thank you... I feel like a big idiot I tried to set it to 3.5 like 2 days ago and there was something odd happening (don't recall what so I moved it back to 4). Ooops!

But it back to 3.5 and all is happy again!
0 Kudos
ChrisPrater
New Contributor
I built an app using charting in flex builder 3 standard, and before I could upgrade to professional the version was changed to 4.  I'm now using 4 with the 3.5 sdk and the "flex data visualization trial" watermark is still shown.  Any ideas on how to remove this?
0 Kudos
Guilhermeventura
New Contributor
Ok so I am in the midst of getting a proper Flex Builder/Flash Builder License.

I have a Trial of Flex Builder 3 which doesn't allow me to use the charts extension and I can't find the extension to download anymore because Flash Builder 4 has been released now.

so I downloaded Flash Builder 4, but none of the chart functionality is working now. For that matter neither are any of my line symbols (but I just changed all of the symbology to remove outlines).

I need the charts to work though.

This is the error I get:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.charts.chartClasses::CartesianChart/updateMultipleAxesStyles()
at mx.charts.chartClasses::CartesianChart/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()


And it fails on the CartesianChart.as Action Script Line: var hslen:uint = hsNames.length;

Which falls within this function...
private function updateMultipleAxesStyles():void
    {
        var hsNames:Array /* of String */ = getStyle("horizontalAxisStyleNames");
        var vsNames:Array /* of String */ = getStyle("verticalAxisStyleNames");
       
        var n:uint = _horizontalAxisRenderers.length;
       
        var hslen:uint = hsNames.length;
        var vslen:uint = vsNames.length;
       
        for (var i:int = 0; i < n; i ++)
        {
            if (_horizontalAxisRenderers is DualStyleObject)
            {
                DualStyleObject(_horizontalAxisRenderers).internalStyleName =
                    hsNames[i % hslen];
            }
        }

What can I do to fix this? I tried downloading the beta 2 ArcGIS Flex SWC that didnt' seem to help or do anything. I saw a post about downloading a different Flash Sdk but the build that was suggested was no longer on line either.

I am at a lost and need help as I have very few days left before I need this application for a presentation.

Thanks
Heather


This could be fixed using the Flex 4.1 SDK (4.1.0.16076 Build) with Flex 3
compatibility checked. In Flex 4.0 SDK this still are a bug, then,  go upgrade your
SDK and be happy  =D
0 Kudos