views:

34

answers:

2

As the title suggests, is there any documentation on the FlexBuilder "expressions" tab, and what expressions it can accept?

As far as I can tell, it can show the value of variables, but that's it: comparisons, function and method calls all fail:

alt text

Edit: this is specific to FB3 — Flex Builder. Apparently FB4 — Flash Builder — is slightly less incompetent.

+2  A: 

It depends if you're using FlexBuilder 3 or FlashBuilder 4. FB 3 has pitiful expressions capability. You can basically access variables and their member properties, period. And not always all the member properties.

FB 4 gives you the ability to evaluate real expressions, like

getStyle("vertical-align")
getStyle("vertical-align") + "foo" 
parseInt(getStyle("padding-left"))

etc.

Robusto
Hrm, alright - thanks :(
David Wolever
(sad face because, well, I was really hoping that I was using it wrong and it actually was, err, useful… Oh well…)
David Wolever
A: 

It shows the values of variables, and the results of expressions as at the current breakpoint in the debugger.

eg:

public function testMethod():void {
   var a:String;  // <-- Set breakpoint here
   a = "Hello";
   a = "World";
}
public function testMethodB():void {
   var b:String = "Another String";
}

You can create an expression for a and watch the value change over time.

However, the variable must have a value within the context. For example, setting the breakpoint where indicated, and defining an expresssion for b would show an error.

Marty Pitt
Thanks for the answer, but it doesn't really tell me anything new… I've noted in the question that it can give the value for variables… And you've said "the results of expressions", but you haven't given examples of expressions it can successfully evaluate.
David Wolever