Link to home
Start Free TrialLog in
Avatar of gdejarnett
gdejarnett

asked on

Flex 4.6 -- how to debug runtime errors

I'm teaching myself Adobe Flex 4.6 (FlashBuilder) and am picking up the coding method fine, but having trouble when I hit a runtime error.

For example, I have an app on a tabbed control that has a datagrid on each tab pulling MySQL data for display.  Rather than having all this code in the main file, I created separate components for each datagrid and dropped them into each tab.

Everything worked fine until I converted the last datagrid display into a component and put it on the top tab and removed the corresponding code in the main file.  That grid displays properly, but now when I click on any of the other tabs to show those grids I get the following runtime error:


ReferenceError: Error #1065: Variable _Componenets_teacherGridWatcherSetupUtil is not defined.
      at global/flash.utils::getDefinitionByName()
      at Componenets::teacherGrid()[C:\Users\Gary\Adobe Flash Builder 4.6\FlexPHPMysqlUpdateAdv\src\Componenets\teacherGrid.mxml:4]
      at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.y\frameworks\projects\mx\src\mx\core\Container.as:4294]
      at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.y\frameworks\projects\mx\src\mx\core\Container.as:4183]
      at mx.core::Container/createDeferredContent()[E:\dev\4.y\frameworks\projects\mx\src\mx\core\Container.as:4214]
      at mx.containers::ViewStack/instantiateSelectedChild()[E:\dev\4.y\frameworks\projects\mx\src\mx\containers\ViewStack.as:1260]
      at mx.containers::ViewStack/commitProperties()[E:\dev\4.y\frameworks\projects\mx\src\mx\containers\ViewStack.as:756]
      at mx.containers::TabNavigator/commitProperties()[E:\dev\4.y\frameworks\projects\mx\src\mx\containers\TabNavigator.as:566]
      at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
      at mx.managers::LayoutManager/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:813]
      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]


Not sure how to begin debugging this and any help on this specific error, or on runtime debugging in Flex would be appreciated.

Thanks,

Gary
Avatar of gdejarnett
gdejarnett

ASKER

Following up, I found that the problem was that I didn’t have the as3corelib in my build path.

I'm not getting this error now, but if I could get some good advice on how to debug runtime errors here, I'll still award the points.

Also if there are any Flashbuilder settings I should change (that are not already set by default) to avoid runtime errors, please let me know.

Thanks,

Gary
ASKER CERTIFIED SOLUTION
Avatar of Proactivation
Proactivation
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the suggestion.

Yes, I do use the debugger, but my problem is that when I would run it before deploying, it would run cleanly.

I'll look more into the try/catch blocks though and see if I can bring it to the surface that way.

Thanks again for taking the time to help,

Gary