20090601

DataGrid - Extracting edited Value from DataGridEvent




private function saveValue(event:DataGridEvent) : void
{
if(event.reason == DataGridEventReason.CANCELLED)
return;
var newValue : String = TextInput(event.currentTarget.itemEditorInstance).text;
var prevCellValue : String = myDataGrid.selectedItem[event.dataField];

if( prevCellValue == newValue)
return;
Alert.show("New value :: "+newValue);
}

...
...

<mx:DataGrid id="myDataGrid" width="100%" dataProvider="{defCreativeVals}" editable="true" itemEditEnd="{saveValue(event)}">
<mx:columns>
<mx:DataGridColumn headerText="Column" id="colColumn" editable="false" dataField="name"/>
<mx:DataGridColumn headerText="Value" id="colValue" editable="true" dataField="value" />
</mx:columns>
</mx:DataGrid>

20090112

Location of flashlog.txt

The output of trace statements is logged to flashlog.txt in the debug version of Flash l
Following is the location of flash player log file (flashlog.txt) on various operating systems.


  • Windows Vista : C:\Users\{user-name}\AppData\Roaming\Macromedia\Flash Player\Logs
  • Windows XP : C:\Documents and Settings\{user-name}\Application Data\Macromedia\Flash Player\Logs
  • Linux : /home/{user-name}/.macromedia/Flash_Player/Logs/
  • Mac : /Users/{user-name}/Library/Preferences/Macromedia/Flash Player/Logs/

20080206

Changing Tooltip display time

ToolTipManager.hideDelay = 20000; //20 sec -> specify the value in milliseconds


Enable the ToolTip to support HTML
http://www.flex-flex.net/blog/article.asp?id=18

Changing Default Busy Cursor in Flex

Do the following during the initialization of the Flex Application to change the default busy cursor of the Flex Application to a cursor of your choice :




[ Embed(source="mybusycursor.gif") ]
public static const myBusyCursor : Class;

StyleManager.getStyleDeclaration("CursorManager").setStyle("busyCursor",myBusyCursor);