Skip to content

Instantly share code, notes, and snippets.

@andrerocker
Created February 10, 2011 18:21
Show Gist options
  • Save andrerocker/821028 to your computer and use it in GitHub Desktop.
Save andrerocker/821028 to your computer and use it in GitHub Desktop.
Ja sou um AS3 ninja ?
public static function carregaCombo(combo:DropDownList, funcao:Function, currentSelected:*=null, callback:Function=null):void
{
funcao.apply(null, [function(event:ResultEvent):void {
combo.dataProvider = event.result as ArrayCollection;
if(currentSelected)
selecionaCorrente(false, combo, currentSelected);
if(callback!=null)
callback.apply(null, [event]);
}]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment