Archive Page 2
Minor Flexation
Nothing to do with information design, this one – just a note on a Flex bug I’m hoping might be useful to anyone else who tries punching the cryptic error messages they’re receiving into Google.
I’ve been playing around with Flex lately, and so far it’s great – it lets you play around with functionality and design with incredible intuitiveness.
Unfortunately, the Flex 3 Builder doesn’t handle CSS very well. two problems I’ve run into so far:
(1) Underscores not allowed in CSS selector names: for some reason (the Adobe note on the problem isn’t terribly helpful), Flex will not allow you to use an underscore character (‘_’) in CSS selectors.
Unfortunately, it doesn’t identify the problem as such. Instead, Flex reports it (as it does all CSS faults, as far as I can tell) as a difficulty with the root Application element using the message ‘There is an error at line n of your MXML document: the “Application” tag has invalid syntax’. Naive users unfamiliar with Flex may then waste a good couple of hours trying to figure out what the $#%^ could possibly be wrong with a well-formed <mx:Application /> tag.
Remove the underscore, however, and the problem disappears.
(2) A second CSS difficulty comes with the ‘Convert to CSS …’ button (in the ‘Flex Properties’ window Standard View).
The idea behind this button is a great one: doodle the look ‘n’ feel of a component in the Flex Design View, then hit the button to universalize it using a CSS stylesheet.
The problem is that the syntax of the Embed directive is different, depending on whether it’s used in the MXML or the CSS file. In the latter, you don’t/can’t use the ‘@’ prefix necessary for the former - but Flex doesn’t remove it automatically when performing its CSS conversion. The result is that you once again get a fault reported with the MXML root, when the difficulty is instead in the CSS document.
Both of these are pretty minor niggles in an otherwise incredibly helpful tool – but because they’re minor and syntactical, and especially because the error-reporting isn’t great, they can be a real timesuck on your project …
Filed under: Flex | Leave a Comment
Tags: css, Flex, flex bug