So I was still experiencing the same issue whenever I would extend the GridItemRenderer class. I was finding that element.getLayoutMatrix() was returning null here: https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/spark/src/spark/components/gridClasses/DataGridDragProxy.as#L161
I think this caused bad effects later on. See the ticket here: https://issues.apache.org/jira/browse/FLEX-33722 On 9 September 2013 12:59, Marcus Wilkinson <[email protected]>wrote: > So I tried rolling out the patch in the above ticket and I soon started > experiencing the same issue Mario Specht has, which is the null pointer in > MatricUtil (being passed in a null matrix). > > I found there might be a problem with this: > > https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/spark/src/spark/components/gridClasses/DataGridDragProxy.as#L201 > > Looks like o.validateNow() should be called within the loop. I tried > patching it and it hasn't crashed yet. I'm going to do some more > investigation and raise a ticket (hopefully with a patch) when I find out > more. > > > On 5 September 2013 15:31, Marcus Wilkinson <[email protected]>wrote: > >> Hello, I was actually experiencing the same problem and have already made >> a ticket for it: >> https://issues.apache.org/jira/browse/FLEX-33705 >> >> The problem is with the drag proxy (the transparent copy of the row which >> follows your mouse). It gets the grid to make new item renderers but fails >> to assign the column to the new item renderers. I made a patch which seems >> to work for which is also on the ticket. >> >> Marcus >> On 5 Sep 2013 13:12, "mspecht" <[email protected]> wrote: >> >>> The data is not the problem, the column is null. If I change it the >>> following way: >>> >>> if(column) >>> albumName.text = data[column.dataField]; >>> >>> I get a null pointer exception in MatrixUtil.as:543 >>> >>> >>> change it to >>> >>> if(data) >>> albumName.text = data[column.dataField]; >>> >>> >>> >>> >>> Thank You, >>> Stephen C >>> -All of my email addresses go to the same place >>> -Save Paper, think before you print >>> -PGP Public Key< >>> https://docs.google.com/file/d/0B0JeFeQj5XjkZC0talFuRExyc0E/edit?usp=sharing >>> > >>> >>> >>> On Thu, Sep 5, 2013 at 7:46 AM, <[hidden >>> email]</user/SendEmail.jtp?type=node&node=2578&i=0>> wrote: >>> >>> > The itemRenderer looks like this: >>> > >>> > <?xml version="1.0" encoding="utf-8"?> >>> > <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" >>> > xmlns:s="library:// >>> > ns.adobe.com/flex/spark" >>> > xmlns:mx="library:// >>> > ns.adobe.com/flex/mx" clipAndEnableScrolling="true"> >>> > >>> > <fx:Script> >>> > <![CDATA[ >>> > override public function >>> > prepare(hasBeenRecycled:Boolean):void { >>> > albumName.text = data[column.dataField] >>> > } >>> > ]]> >>> > </fx:Script> >>> > >>> > <s:VGroup height="100" paddingTop="10"> >>> > <s:Label id="albumName" >>> > width="100%" >>> > text="{data.Album}"/> >>> > </s:VGroup> >>> > >>> > </s:GridItemRenderer> >>> > >>> > -----Ursprüngliche Nachricht----- >>> > Von: Stephen C [mailto:[hidden >>> email]</user/SendEmail.jtp?type=node&node=2578&i=1>] >>> > Gesendet: Donnerstag, 5. September 2013 13:38 >>> > An: [hidden email]</user/SendEmail.jtp?type=node&node=2578&i=2> >>> > Betreff: Re: DataGrid with itemRenderer Drag and Drop error >>> > >>> > in your itemRenderer are you doing if(data){} etc... There any many >>> reasons >>> > for null data being in a cell. >>> > >>> > Thank You, >>> > Stephen C >>> > -All of my email addresses go to the same place >>> > -Save Paper, think before you print >>> > -PGP Public Key< >>> > >>> https://docs.google.com/file/d/0B0JeFeQj5XjkZC0talFuRExyc0E/edit?usp=sharing >>> > > >>> > >>> > >>> > On Thu, Sep 5, 2013 at 7:28 AM, mspecht <[hidden >>> email]</user/SendEmail.jtp?type=node&node=2578&i=3>> >>> > wrote: >>> > >>> > > Hi, >>> > > >>> > > I tried to use the drag and drop functionality of the DataGrid. One >>> > column >>> > > contains a special itemrenderer. As soon as I try to drag one item I >>> get >>> > a >>> > > null pointer exception for the coulmn in the itemRenderer. >>> > > >>> > > A simple example is attached. >>> > > >>> > > I didn't find a related bug in JIRA. May I open a ticket? >>> > > >>> > > FlexDataGrid.fxp >>> > > < >>> > > >>> > >>> http://apache-flex-users.2333346.n4.nabble.com/file/n2574/FlexDataGrid.fxp >>> > > > >>> > > >>> > > >>> > > >>> > > -- >>> > > View this message in context: >>> > > >>> > >>> http://apache-flex-users.2333346.n4.nabble.com/DataGrid-with-itemRenderer-Drag-and-Drop-error-tp2574.html >>> > > Sent from the Apache Flex Users mailing list archive at Nabble.com. >>> > > >>> > >>> >>> ________________________________ >>> If you reply to this email, your message will be added to the discussion >>> below: >>> >>> http://apache-flex-users.2333346.n4.nabble.com/DataGrid-with-itemRenderer-Drag-and-Drop-error-tp2574p2578.html >>> To unsubscribe from DataGrid with itemRenderer Drag and Drop error, >>> click here< >>> http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2574&code=bWFyaW8uc3BlY2h0QGJlcnRlbHNtYW5uLmRlfDI1NzR8LTE2Njc0NzAyMTU= >>> >. >>> NAML< >>> http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml >>> > >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://apache-flex-users.2333346.n4.nabble.com/DataGrid-with-itemRenderer-Drag-and-Drop-error-tp2574p2579.html >>> Sent from the Apache Flex Users mailing list archive at Nabble.com. >>> >> >
