Tuesday, February 13, 2007

Flex Builder cut me

Wait, didn't I say I liked Flex Builder? Yes I did, but they could make things a hell of a lot better. I talked about some of the things I wish Flex builder had in an earlier post, but I recently come across a couple other things. When debugging dynamic expressions cannot be evaluated in watches. This was very frustrating when doing some xml parsing as the attributes of an xml snip are accessed via dynamic methods on the xml object. It goes something like this:

var xml:XML = < r>< e1 >< a1 >< /a1 >< /e1>< /r>
xml.e1


Now, if I put a watch on something like 'xml.element1' Flex Builder says that it can't evaluate the expression because of an exception. This was very frustrating as I thought there actually was a problem with my xml or syntax. The real problem was with Flex builder not being able to evaluate the dynamic expression when in debug mode. To get around this all I did was assign the value of 'xml.element1' to a variable, then put a watch on that variable.

No comments: