A lot of people don't like it, stylistically, but it will certainly work.
Generally I don't use ternary operators for anything other than assignments.
Piers
On 9 Mar 2010, at 20:23, Mendelsohn, Michael wrote:
> Hi list...
>
> Can something like this be done? Just curious...
>
> - MM
>
>
>
> function traceNum(i:int):void{
> trace(i);
> }
> function traceString(a:String):void{
> trace(a);
> }
>
> var s:String = "hi";
>
> (s!="")?traceString.call("yes"):traceNum.call(44);
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders