function foo() {
        trace("foo");
}
function bar() {
        trace("bar");
}
(true) ? foo() : bar();
-- "foo"
(false) ? foo() : bar();
-- "bar"

Works fine for me.  Not the best practice (I would never use it), but
just showing what's possible with inline conditionals.



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of eka
> Sent: Friday, January 26, 2007 2:27 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Shorhand for if statement without 
> else statement
> 
> Hello :)
> 
> In FDT for example : cond ? methodA() : methodB() failed :)
> 
> The operator cond ? true : false is used to return a value 
> but isn't really the good solution to launch method i think :)
> 
> EKA+ :)
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to