DataGrid 구성 요소를 만들고 DataGrid를 만들 때 기본 응용 프로그램에 이벤트를 전달하려고합니다. 그러나, 나는Flash Builder의 사용자 정의 구성 요소에서 사용자 정의 이벤트를 선언 할 수 없습니다.
"Type was not found or was not a compile-time constant:dataGridComp"
"Call to a posibly undefined methoud dataGridComp"
내 구성 요소
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Metadata> //declare my event
[Event(name="dataGridComp", type="flash.events.Event")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
{
// TODO Auto-generated method stub
var e:dataGridComp = new dataGridComp("dataGridComp"); //problem here
dispatchEvent(e); //want to dispatch my event object when the datagrid is created
}
]]>
</fx:Script>
<s:DataGrid id="dataGrid" editable="true" x="51" y="34" width="734" height="153"
creationComplete="dataGrid_creationCompleteHandler(event)" requestedRowCount="4">
........
..........
</s:DataGrid>
</s:Group>
이 문제를 해결하는 방법을 어떤 생각을 말하는 오류가있어? 어떤 도움을 주셔서 감사합니다. 고마워.