I know it, but I can't choice another Class because evt.mouseTarget is 
InteractiveObject

I write code 

if (evt.mouseTarget.hasOwnProperty("data"))
  var inObj:AdvancedDataGridItemRenderer = evt.mouseTarget;

The error message

1118: Implicit coercion of a value with static type 
flash.display:InteractiveObject to a possibly unrelated type 
mx.controls.advancedDataGridClasses:AdvancedDataGridItemRenderer.

In debug mode I can see value of evt.mouseTarget but I can assign it to any 
variables in my knowledge :(


> Here, you've chosen to type your variable as InteractiveObject:
>            vvvvvvvvvvvvvvvv
> var inObj:InteractiveObject;
> inObj = evt.mouseTarget;
> 
> Yet you say that the actual data type of your object is this:
> 
> inObj = inObj =
> (mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer)
> mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer (@9385479)
> 
> 
> AdvancedDataGridItemRenderer has a data property.  InteractiveObject, its 
> great-great-grandparent class, does not.  So, you have the choice of typing 
> this object as anything in its inheritance chain, plus the five interfaces it 
> implements.  You've chosen to type it as InteractiveObject, which doesn't 
> have a data property, nor does UITextField, FlexTextField, DisplayObject, 
> EventDispatcher, or Object.
> 
> Change var inObj:InteractiveObject
> 
> to var inObj:SomeClassOrInterfaceThatHasADataProperty
> 
> HTH;
> 
> Amy
>


Reply via email to