actionscript - AS3 default values as Class in Function Parameter -


how can assign default value function parameter of type class in action script 3

    public function foo(param:class = ????? )     {      } 

thanks

you can't, here's workaround achieve same effect:

public function foo(param:class = null ):void {     if(!param)      {         // this'll default class         param = myclass;     }     //  here can do: var bar:* = new param(); } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -