that is probably the best way short of defining the component as a separate component in it's own mxml or as file.
--- In [email protected], "Xia Zhao" <[EMAIL PROTECTED]> wrote: > > I use outerDocument.deleteRow(.. in my application and it works well. > > On 13/03/07, Paul DeCoursey <[EMAIL PROTECTED]> wrote: > > > > Have you tried this.deleteRow(... > > > > --- In [email protected] <flexcoders%40yahoogroups.com>, > > "Alexandre Lemaire" <rm1x@> wrote: > > > > > > Inside of an mxml file, I have a datagrid, with a Button item > > renderer as such: > > > > > > > > > <mx:DataGridColumn headerText="delete" textAlign="center" > > editable="false"> > > > <mx:itemRenderer> > > > <mx:Component> > > > <mx:VBox horizontalAlign="center"> > > > <mx:Button label="" icon="@Embed('../images/delete.png')" /> > > > </mx:VBox> > > > </mx:Component> > > > </mx:itemRenderer> > > > </mx:DataGridColumn> > > > > > > > > > In that Button, I would like to call a function that exists in the > > same .mxml file > > > > > > > > > public function deleteRow( id:String ):void{ > > > > > > > > > } > > > > > > > > > > > > Unfortunately, if I edit the button to read like: > > > > > > <mx:Button label="" icon="@Embed('../images/delete.png')" > > click="deleteRow( data.tld );" /> > > > > > > It writes that the function deleteRow doesn't exist, which I imagine > > is a scope problem. How do I get around this? > > > > > > Thanks in advance, > > > Alex > > > > > > > > > >

