How do make a function return *, by star, I mean the function is able to return anything, and then I can typecast it accordingly?
private function get_current_files_view():TileList
{
var tlist:TileList;
//switch(this[fm_model.files_display_type])
switch(vs_file_display.selectedChild)
{
case cvs_user_files:
tlist = tlist_files;
break;
case bx_shared_data:
tlist = tlist_shared_with_me;
break;
default:
throw new Error('Invalid container found');
}
return tlist;
}
Suppose in this function, I want this function to return both tilelist and datagrid (according to the case) what should be changed.
Plz let me know Thanks you.