3 Replies Latest reply on Mar 18, 2008 11:57 AM by SiHoop

    parentDocument not working

    SiHoop Level 1
      I've used parentDocument several times in the past to embed an image in a DataGrid, but now it won't work. Below is the deconstructed file. I get an error message when I click on the image:
      Error #1069: Property clickMe not found on fileName and there is no default value.
      Why won't parentDocument work? Am I missing something very simple?
      Thanks for looking!

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application width="100%" height="100%" xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      import mx.collections.ArrayCollection;
      private var classesColumn:ArrayCollection;
      private function clickMe():void{
      private function test():void{
      <mx:ArrayCollection id="myAC">
      <mx:Array id="myArray">
      <mx:Object label="MI" data="Lansing"/>
      <mx:Object label="MO" data="Jefferson City"/>
      <mx:DataGrid id="classesDataGrid" dataProvider="{myAC}" itemClick="test()">
      <mx:DataGridColumn >
      <mx:LinkButton click= "parentDocument.clickMe()" width="20"
      upSkin="@Embed(source='../assets/trashCan.png')" overSkin="@Embed(source='../assets/trashCan.png')"/>
      <mx:DataGridColumn dataField="label"/>
      <mx:DataGridColumn dataField="data"/>