|
Abdul, Since my flex app is a
prototype, components will surely change names and types, so I am required to
have enough flexibility of code and components. Bottom Line: How can I have a button’s
click trigger the same event as my Grid’s cellPress, given the following
code? Button: <mx:Button
id="btnViewDetail" label="Ver Detalle"
click="showLiquidationDetail();"/> DataGrid: <mx:DataGrid
id="liquidationRequestsGrid" dataProvider="{mx.utils.ArrayUtil.toArray(liquidationsModel.liquidation)}"
cellPress="handleDoubleClick(event);" width="100%"> Functions: public
function showLiquidationDetail(Void):Void { var
selectedItem:Object = liquidationRequestsGrid.selectedItem; getLiquidationDetail(selectedItem); } public
function handleDoubleClick(event:Object):Void { if
(event.target.selectedItem != undefined || event.target.selectedItem.length ==
1) { if(handler.detectDoubleClick())
{ getLiquidationDetail(event.target.selectedItem); } } else
{ alert("Sólo es posible ver el detalle de una sola
liquidación.", "Alerta", Alert.OK, undefined, undefined,
errorImg); } } Is there a way to have the
same event object in both methods, so that I can get rid of the grid reference in
showLiquidationDetail method? Hope I’m explaining
myself. J. De: Hi, Yahoo! Groups Links
|
RE: [flexcoders] About single methd handling mutiple events.
Jesus Salvador Ramos Cardona Fri, 22 Apr 2005 20:18:02 -0700
- RE: [flexcoders] About single methd handling ... Jesus Salvador Ramos Cardona
- RE: [flexcoders] About single methd hand... Jesus Salvador Ramos Cardona
- RE: [flexcoders] About single methd hand... Abdul Qabiz
- RE: [flexcoders] About single methd hand... Abdul Qabiz

