Thanks for your response:
> Use int instead of Boolean ?
> 
> -1 (instead of null)
>  0 (instead of false)
>  1 (instead of true)

You are right, this is better than declaring b:*.

Hindsite tells me I would be a better programmer if I just created a 
second function (one to toggleDetails and one to setDetails) I 
thought I was making it more concrete by creating one function that 
did it all, but when I really think about it, it's harder for someone 
to understand the implied meaning (e.g. not passing a parameter means 
you toggle) than having to remember there are two separate 
functions...

private var _details:Boolean;
public function toggleDetails():void{
  _details = !_details;
}
public function setDetails(b:Boolean):void{
  _details = b;
}

Thanks...

Reply via email to