wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

TreeGridColumn null reference when used with TreeGrid #178

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I first created a simple TreeGrid with the following code:

<mx:Canvas width="100%" height="200" backgroundColor="#333333">
                    <toolbars:ImageToolbar id="imageToolbar" />
                    <code:TreeGrid id="imageNoteGrid"
                        dataProvider="{nodeXML..node}" width="100%" height="100%">
                        <code:columns>
                               <code:TreeGridColumn dataField="@name" />
                                <mx:DataGridColumn dataField="desc" />
                        </code:columns> 
                      </code:TreeGrid>
                </mx:Canvas>
2. then used this as the data provider:

<node id="1" name="Companies" type="COMPANIES" desc="All Companies"
statusIcon="statusIcon">
                                                    <node id="2" name="Adobe" type="COMPANY" desc="Adobe inc."
statusIcon="statusIcon">
                                                        <node id="5" name="Adobe Consulting" type="COMPANY"
desc="Adobe (formerly macromedia)" statusIcon="statusIcon" />
                                                        <node id="6" name="EDBU" type="COMPANY" desc="Database
company" statusIcon="statusIcon" />
                                                    </node>
                                                    <node id="3" name="Macromedia" type="COMPANY" desc="Adobe
(formerly macromedia)" statusIcon="statusIcon" />
                                                    <node id="4" name="Oracle" type="COMPANY" desc="Database
company" statusIcon="statusIcon" />
                                                </node>

3. and tied to compile. 

What is the expected output? What do you see instead?

Expected the TreeGrid to be created.
instead I got this error.

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
    at
flexlib.controls.treeGridClasses::TreeGridItemRenderer/updateDisplayList()[/User
s/dougmccune/Documents/Flex
Builder
Moxie/flexlib/trunk/src/flexlib/controls/treeGridClasses/TreeGridItemRenderer.as
:333]
    at
mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\fram
ework\src\mx\core\UIComponent.as:6214]
    at
mx.managers::LayoutManager/validateClient()[E:\dev\3.0.x\frameworks\projects\fra
mework\src\mx\managers\LayoutManager.as:860]
    at
mx.core::UIComponent/validateNow()[E:\dev\3.0.x\frameworks\projects\framework\sr
c\mx\core\UIComponent.as:5550]
    at
mx.controls.listClasses::ListBase/drawItem()[E:\dev\3.0.x\frameworks\projects\fr
amework\src\mx\controls\listClasses\ListBase.as:5053]
    at
mx.controls.dataGridClasses::DataGridBase/drawItem()[E:\dev\3.0.x\frameworks\pro
jects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:1128]
    at
mx.controls.dataGridClasses::DataGridBase/drawVisibleItem()[E:\dev\3.0.x\framewo
rks\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:1111]
    at
mx.controls.dataGridClasses::DataGridBase/makeRows()[E:\dev\3.0.x\frameworks\pro
jects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:705]
    at
mx.controls.dataGridClasses::DataGridBase/makeRowsAndColumns()[E:\dev\3.0.x\fram
eworks\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:590]
    at
mx.controls::DataGrid/makeRowsAndColumns()[E:\dev\3.0.x\frameworks\projects\fram
ework\src\mx\controls\DataGrid.as:1536]
    at
mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.0.x
\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:1360]
    at
mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.0.x\frameworks\pr
ojects\framework\src\mx\controls\listClasses\ListBase.as:3654]
    at
mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[E:\dev\3.0.x\frame
works\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:578]
    at
mx.controls::DataGrid/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\frame
work\src\mx\controls\DataGrid.as:1435]
    at
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.0.x\frameworks\
projects\framework\src\mx\controls\listClasses\ListBase.as:3281]
    at
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\project
s\framework\src\mx\managers\LayoutManager.as:602]
    at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\proje
cts\framework\src\mx\managers\LayoutManager.as:657]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\fra
mework\src\mx\core\UIComponent.as:8460]
    at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\fram
ework\src\mx\core\UIComponent.as:8403]
What version of the product are you using? On what operating system?

Mac OSX, I just downloaded latest flexlib, as of Dec 4, 2008. think its 2.4

Please provide any additional information below.

Original issue reported on code.google.com by john.gia...@gmail.com on 5 Dec 2008 at 10:57

GoogleCodeExporter commented 8 years ago

Original comment by dmcc...@gmail.com on 8 Jan 2009 at 6:12

GoogleCodeExporter commented 8 years ago
This sounds like you have a null pointer exception in your treeGridItemRenderer 
code.
 Try debugging it in flex and then looking at the variables they are referring to. 
It would be good if you could include the code snippet in the method
updateDisplayList() in TreeGridItemRenderer.

Original comment by bdub...@gmail.com on 20 Feb 2009 at 3:52

GoogleCodeExporter commented 8 years ago
Duplicate of issue #124, the problem is when no default disclosure icons are 
defined.
Fix will target the RTE and add defaults, will be updated on issue #124

Original comment by dmcc...@gmail.com on 26 Oct 2009 at 12:47