I have a class that needs instantiating with an object:
public class FusePumpComboBox extends Sprite
{
private var _rowCount;
public function FusePumpComboBox(args:Object)
{
_rowCount = (args.rowCount !== undefined) ? args.rowCount : 5;
}
}
What if I don’t want to pass it a row count and instantaiate like this:
var obj:FusePumpComboBox = new FusePumpComboBox();
At the moment I get an error with mismatched number of arguments, as you’d expect. I’ve tried giving the args:Object a default value… I think this is where the solution lies, just don’t know what to give it or how (args:Object = {}) doesn’t work.
EDIT: I will also have getters and setters…
You could try this: