Select to view content in your preferred language

Crash in Widget Creation after Migrating from Flex API 1.3 to 2.1

551
1
12-10-2010 05:12 PM
HenryKo
Deactivated User
Hi,

I have a client who is migrating a Flex project based on Sample Flex Viewer from API 1.3 to API 2.1. As part of that, we also needed to migrate from Flex Builder 3 to Flash Builder 4, and migrate the Flash SDK from 3.5 to (I think) 4.1.

While we got the project compiling, it is crashing at this line when we try to run the project:

WidgetManagerDocked.mxml -> widgetReadyHandler() -> widgetBox.addChild(widgetDO);


The last few lines of the exception are here:


TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.core::UIComponent/getStyle()
      at mx.core::UIComponent/getTextFieldClassName()
      at mx.core::UIComponent/createInFontContext()
      at mx.controls::Label/http://www.adobe.com/2006/flex/mx/internal::createTextField()
      at mx.controls::Label/createChildren()
...
...


I am guessing it might have something to with updating the line UIManager.mxml -> config() -> StyleManager.loadStyleDeclarations from 1.3 to 2.1 incorrectly.

Has anyone come across this problem before?

Thanks.
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Henry,

   You need to carefully look at your error... What is immediately obvious to me is, that in FlexViewer 2.1 there is no such thing as WidgetManagerDocked (That was SFV1.x).
0 Kudos