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_teacherGridWa tcherSetup Util is not defined.
at global/flash.utils::getDef initionByN ame()
at Componenets::teacherGrid() [C:\Users\ Gary\Adobe Flash Builder 4.6\FlexPHPMysqlUpdateAdv\ src\Compon enets\teac herGrid.mx ml:4]
at mx.core::Container/createC omponentFr omDescript or()[E:\de v\4.y\fram eworks\pro jects\mx\s rc\mx\core \Container .as:4294]
at mx.core::Container/createC omponentsF romDescrip tors()[E:\ dev\4.y\fr ameworks\p rojects\mx \src\mx\co re\Contain er.as:4183 ]
at mx.core::Container/createD eferredCon tent()[E:\ dev\4.y\fr ameworks\p rojects\mx \src\mx\co re\Contain er.as:4214 ]
at mx.containers::ViewStack/i nstantiate SelectedCh ild()[E:\d ev\4.y\fra meworks\pr ojects\mx\ src\mx\con tainers\Vi ewStack.as :1260]
at mx.containers::ViewStack/c ommitPrope rties()[E: \dev\4.y\f rameworks\ projects\m x\src\mx\c ontainers\ ViewStack. as:756]
at mx.containers::TabNavigato r/commitPr operties() [E:\dev\4. y\framewor ks\project s\mx\src\m x\containe rs\TabNavi gator.as:5 66]
at mx.core::UIComponent/valid atePropert ies()[E:\d ev\4.y\fra meworks\pr ojects\fra mework\src \mx\core\U IComponent .as:8219]
at mx.managers::LayoutManager /validateP roperties( )[E:\dev\4 .y\framewo rks\projec ts\framewo rk\src\mx\ managers\L ayoutManag er.as:597]
at mx.managers::LayoutManager /doPhasedI nstantiati on()[E:\de v\4.y\fram eworks\pro jects\fram ework\src\ mx\manager s\LayoutMa nager.as:8 13]
at mx.managers::LayoutManager /doPhasedI nstantiati onCallback ()[E:\dev\ 4.y\framew orks\proje cts\framew ork\src\mx \managers\ LayoutMana ger.as:118 0]
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
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_teacherGridWa
at global/flash.utils::getDef
at Componenets::teacherGrid()
at mx.core::Container/createC
at mx.core::Container/createC
at mx.core::Container/createD
at mx.containers::ViewStack/i
at mx.containers::ViewStack/c
at mx.containers::TabNavigato
at mx.core::UIComponent/valid
at mx.managers::LayoutManager
at mx.managers::LayoutManager
at mx.managers::LayoutManager
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
ASKER
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