Tuesday, January 16, 2007

nullpointerexception in flex style compiling

So far my experience with flex builder's compiler and debugger has been amazing.
However I ran into my first encounter with bad error reporting today.

I would get java.exception.NullPointerException on the tag <mx:Style source="somestyle.css"/>. Hrm. Had to go through commenting out the stylesheet until it compiled to figure out that the swf I generated from an .fla where I didn't have fonts wouldn't coerce the system fonts into the expected names, so trying to access them in that swf generated the exception.
Annoying that the part of the css that caused the error wasn't pointed to - the compiler I guess calls some other java css compiler and can't bubble the details into its context.

Oh well, still a pretty easy thing to fix, but I felt like I was back in javascript or php land, commenting out partial pieces of code to find the culprit breaking the build =)

No comments: