As I was saying I can not share files, I think that I must
resolve this bug as a priority as this function is essential for
this application.
I have no error for compile but this don't run , why?
thanks for your help ,
Lionceau,
Look my source :
<mx:VBox width="40%" height="10%" right="0">
<mx:DataGrid id="_fileGrid"
dataProvider="{_fileDescriptors}" width="100%" height="90%">
<mx:columns>
<mx:DataGridColumn dataField="name"/>
<mx:DataGridColumn dataField="size"/>
</mx:columns>
</mx:DataGrid>
<mx:HBox>
<mx:Button id="upload_btn" label="Upload File"
click="onUploadClick()"/>
<mx:Button id="download_btn" label="Download File"
click="onDownloadClick()"/>
<mx:Button id="delete_btn" label="Delete File"
click="onDeleteClick()"/>
</mx:HBox>
</mx:VBox>
/**
* Handle the upload button click.
*/
private function onUploadClick():void
{
var filterArray:Array = [new FileFilter("*.*", "*.*")];
_filePublisher.browse(UIDUtil.createUID(), filterArray);
}
/**
* Handle the download button click.
*/
private function onDownloadClick():void
{
if(_fileGrid.selectedItem) {
try{
_fileSubscriber.download(_fileGrid.selectedItem as
FileDescriptor);
}catch(e:Error) {
trace("Error download: " + e.message);
}
}
}
/**
* Handle the delete button click.
*/
private function onDeleteClick():void
{
if(_fileGrid.selectedItem) {
_filePublisher.remove(_fileGrid.selectedItem as
FileDescriptor);
}
}