lundi 22 février 2016

Static variables initialized with returned value by a static function?

When I initialize a static const variable with the string returned by a static function, it is wrong, and the value of the static const variable is "". The code is as follow:

public static const BALL_TIP:String = Lang.getInstance.parse(LangConst.BALL_TIP);

I think the possible reason is that the static variable is initialized in the phase that function is can't be called.

please help me know why it is. Thank you very much.

Aucun commentaire:

Enregistrer un commentaire