It’s because totalEmployeeData() doesn’t exist at the component scope, but rather the outerDocument scope.  Try this…

 

<mx:Component id="dataCellLinkTest">
<mx:Text
color="0x0000ff"
textDecoration="underline"
textAlign="left"
buttonMode="true"
useHandCursor="true"
mouseChildren="false"
click="outerDocument.totalEmployeeData()" />
</mx:Component>

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jack OMelia
Sent: Thursday, September 28, 2006 11:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] click event in itemRenderer

 

Hi All,

I have a datagrid with a click event calling some functions. I decided
I didn't want the click event to happen on the whole row, just on a
particular column. I have an itemRenderer for the column with a Text
component formatted to look like a link, so I decided to remove the
click event on the datagrid and add it to the text componenet in the
itemRenderer. When I do, the page won't compile and I get an error
saying I'm making a call to an undefined function. I tried something
simpler and set the click event to change the current state. The page
compiled but on click got an error, "call to undefined state".

Here's my itemRenderer:

<mx:Component id="dataCellLinkTest">
<mx:Text
color="0x0000ff"
textDecoration="underline"
textAlign="left"
buttonMode="true"
useHandCursor="true"
mouseChildren="false"
click="totalEmployeeData()"
/>
</mx:Component>

Is there something stupid I'm missing here? Why would an event in an
itemRenderer not be able to see the functions or states in my application?

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to