spring
spring

Reputation: 18507

Is there a way to determine unused data bindings

I've inherited a very large Flex project which uses data binding throughout and in many places it is unclear why (for what purpose) it is being used. I'd like to simplify the code and remove unnecessary data bindings but I don't know how to determine if a particular binding is being used.

Is there a way I can easily determine if any other classes are using a particular var declared as bindable?

Upvotes: 0

Views: 31

Answers (1)

Brian
Brian

Reputation: 3914

The simplest solution (though crude) is to delete the [Bindable] annotation and then look at the warnings from the compiler.

Alternatively, you could rename the variable or make it private and look for compile errors.

Both of these approaches suffer from only applying to one variable at a time. Unfortunately, I'm not aware of any way to generate a report for all bindings.

Upvotes: 2

Related Questions