Flexcoders -
I have a mxml file which is basically copy and paste from the
TimePicker.mxml file. (except for my mxml file is just a label and a
button). When the button is clicked, the value of the label is passed
to the Cairngorm Controller. This works completely fine when I
implement my mxml file within the <mx:DataGrid cellRenderer=".."/>
attribute.
However, I also have the requirement to create datagrids dynamically.
When I create my DataGridColumn and apply my mxml file to the
'cellRenderer' attribute, the component appears correctly, but when I
click the button, the method linked to my click event in the button
never occurs.
I'm implementing the "click" method within my mxml file that renders
the label and button and I can't figure out what I'm doing wrong with
the way the child is created. Thanks in advance.
var _dgc:DataGridColumn = new DataGridColumn("newColumn");
_dgc.cellRenderer = "com.StatusPicker";
//////// com.StatusPicker.mxml////////
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script>
<![CDATA[
var btn : MovieClip;
var listOwner : MovieClip;
var getCellIndex : Function;
var getDataLabel : Function;
function click(){
trace("click occured");
}
function setValue(str:String, item:Object, selection:String):Void
{
status.text = item.STATUS;
}
]]>
</mx:Script>
<mx:Label id="status" textAlign="center" width="20"/>
<mx:Button id="RightArrow" icon="@Embed('/images/rightarrow.png')"
click="click()"/>
</mx:HBox>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/