Ternary conditionals in MXML bindings
September 16th, 2008
Ok, I’m not sure how I missed this and if its common knowledge then forget I said anything, but I found out today that you can do this:
? (dropDown.height + 50) : (descriptorBox.height + 50) }” />
Doesn’t look like much but its a quick and dirty way to have conditional bindings without having to use a binding class or getter/setter method to handle the logic. Call me lazy, but I think this is pretty cool.