I wouldn't have asked if it didn't matter.  The renderer's name property
is used in a lookup table in itemRenderToIndices, so by changing it we
can't find it.  So, you cannot change the name property of a renderer.
 
There are several ways to know which renderer is rolled over.  The
simplest is to check the type of the renderer.  Hopefully you have two
different subclasses, one for the guage, and another for the line chart
so the test is simple:
 
private function itemRollOverEvent(event:Object):void
{

if(ListEvent(event).itemRenderer is GaugeRenderer)
{
    ...
}
else if(ListEvent(event).itemRenderer is LineChartRenderer)
{
    ...
}

}

-Alex

 
________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of arpan srivastava
Sent: Thursday, December 14, 2006 12:23 AM
To: [email protected]
Subject: Re: [flexcomponents] ListEvent.ITEM_ROLL_OVER event not firing
in datagrid ?



yes I am changing the name property because i have one more column where
i have drawn a  line chart, so to know which cell my mouse is on , iam
testing it like this,

private function itemRollOverEvent(event:Object):void
{

if(ListEvent(event).itemRenderer.name=="myRenderer1")
{
    ...
}
else if(ListEvent(event).itemRenderer.name=="myRenderer2")
{
    ...
}

}

but I think it is not because of this, as this event is not even fired.


----- Original Message ----
From: Alex Harui <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, December 14, 2006 9:36:30 AM
Subject: RE: [flexcomponents] ListEvent.ITEM_ROLL_OVER event not firing
in datagrid ?



Are you changing the name property of the renderer?

________________________________

From: flexcomponents@ yahoogroups. com [mailto:flexcompone
[EMAIL PROTECTED] com] On Behalf Of arpan srivastava
Sent: Wednesday, December 13, 2006 7:46 PM
To: flexcomponents@ yahoogroups. com
Subject: Re: [flexcomponents] ListEvent.ITEM_ ROLL_OVER event not firing
in datagrid ?



Hi Gordon,
       I never get this event when I roll over renderers in this column.
What i found is that when I click on this column, error is thrown. when
I debugged this error  it was coming from mouseUpHandler( ) of
DataGrid.as at this point :

var pos:Point = itemRendererToIndic es(r);

here I found that pos is null because itemRendererToIndic es() function
is not able to find the itemrenderer for this point.


----- Original Message ----
From: Gordon Smith <[EMAIL PROTECTED] com>
To: flexcomponents@ yahoogroups. com
Sent: Thursday, December 14, 2006 6:30:07 AM
Subject: RE: [flexcomponents] ListEvent.ITEM_ ROLL_OVER event not firing
in datagrid ?



Is the problem that you NEVER get this event when you roll over
renderers in this column? Or is the problem that you have to roll over
the part of the renderer where you've drawn the gauge?

 

- Gordon

 

________________________________

From: flexcomponents@ yahoogroups. com [mailto:flexcompone
[EMAIL PROTECTED] com] On Behalf Of Alex Harui
Sent: Wednesday, December 13, 2006 11:11 AM
To: flexcomponents@ yahoogroups. com
Subject: RE: [flexcomponents] ListEvent.ITEM_ ROLL_OVER event not firing
in datagrid ?

 

Unclear based on your description.  What does the code for your renderer
look like?

 

________________________________

From: flexcomponents@ yahoogroups. com [mailto:flexcompone
[EMAIL PROTECTED] com] On Behalf Of arpan srivastava
Sent: Wednesday, December 13, 2006 6:31 AM
To: Flex Components
Subject: [flexcomponents] ListEvent.ITEM_ ROLL_OVER event not firing in
datagrid ?

Hi,
    I am creating a datagrid in which one column contains a gauge for
which i created a renderer and i am drawing rectangles using graphics
for creating gauge. I have created a ITEM_ROLL_OVER event for that
datagrid, but when i roll my mouse over gauge column, event is not
fired. I am not getting why ? 

 

________________________________

Check out the all-new Yahoo! Mail beta
<http://us.rd.yahoo.com/evt=43257/*http:/advision.webevents.yahoo.com/ma
ilbeta>  - Fire up a more powerful email and get things done faster. 



________________________________

Have a burning question? Go to Yahoo! Answers
<http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMz
OTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx>  and get answers
from real people who know. 



________________________________

Need a quick answer? Get one in minutes from people who know. Ask your
question on Yahoo! Answers
<http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMz
OTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx> . 

 

Reply via email to