The arrayCollection wasn’t empty and the dataGrid was in
editable=”false”.
The arraycollection was filled with a DataService destination.
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" layout="absolute"
initialize="initComp()"
width="100%" height="100%">
<mx:DataGrid left="0"
right="0" top="0" bottom="0" dataProvider="{
dp }" >
<mx:columns>
<mx:DataGridColumn
headerText="col1" dataField="col1"/>
<mx:DataGridColumn headerText="col2" dataField="col2"/>
<mx:DataGridColumn headerText="col3" dataField="col3"/>
<mx:DataGridColumn headerText="col4"
dataField="col4"/>
</mx:columns>
</mx:DataGrid>
<mx:Script>
<![CDATA[
import
mx.controls.Alert;
import
mx.collections.ArrayCollection;
import
mx.rpc.events.FaultEvent;
import
mx.rpc.events.ResultEvent;
import
mx.data.DataService;
import pt.cofina.intranet.messaging.clientes;
[Bindable]
public var dp:ArrayCollection;
public var cliente:clientes;
private var ds:DataService;
private
function initComp():void
{
dp = new
ArrayCollection();
ds = new
DataService("clientes");
ds.pageSize =
200;
ds.addEventListener(ResultEvent.RESULT,
resultHandler);
ds.addEventListener(FaultEvent.FAULT,
faultHandler);
ds.autoCommit =
true;
ds.fill(dp);
}
private function resultHandler(event:ResultEvent):void
{
}
private function
faultHandler(event:FaultEvent):void
{
Alert.show(event.fault.faultstring,
"Error");
}
]]>
</mx:Script>
</mx:Panel>
João Fernandes
Dep.
Informática - Área de Desenvolvimento
Cofina media
Avenida
João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel
(+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Joan Tan
Sent: sexta-feira, 24 de Março de 2006 19:08
To: [email protected]
Subject: RE: [flexcoders] RTE when selecting a row and pressing tab.
(Beta 2)
I can’t seem to
reproduce this runtime error on Beta 2. If you could send me the file causing
the bug that would be great. What data is in your ArrayCollection when you get
this error, is it empty? What other components are on your page along with this
DataGrid.
Thanks,
Joan
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of João Fernandes
Sent: Friday, March 24, 2006 9:13 AM
To: [email protected]
Subject: [flexcoders] RTE when selecting a row and pressing tab. (Beta 2)
Hi
there,
I
have an ArrayCollection binded to a Datagrid. When I select a row and
press tab I get this:
ArgumentError:
Error #2025: The DisplayObject supplied must be a child of the caller.
at mx.core::Container/getChildIndex()
at mx.containers::Panel/getChildIndex()
at mx.managers::FocusManager/::sortByDepth()
at Array/sort()
at mx.managers::FocusManager/::sortFocusableObjects()
at mx.managers::FocusManager/::setFocusToNextObject()
at mx.managers::FocusManager/::keyFocusChangeHandler()
…
[Bindable]
public var dp:ArrayCollection;
<mx:DataGrid left="0" right="0" top="0"
bottom="0" dataProvider="{ dp }">
<mx:columns>
<mx:DataGridColumn headerText="col1" dataField="col1"/>
<mx:DataGridColumn headerText="col2" dataField="col2"/>
<mx:DataGridColumn headerText="col3" dataField="col3"/>
<mx:DataGridColumn headerText="col4"
dataField="col4"/>
</mx:columns>
</mx:DataGrid>
…
João Fernandes
Dep.
Informática - Área de Desenvolvimento
Cofina media
Avenida
João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel
(+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit
your group "flexcoders"
on the web.
- To
unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your
use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

