Tintin
Tintin

Reputation: 2973

How to disable warning (especially binding warnings) in console in flex (eclipse with flex plug in)

I did suppress warnings in flex compiler using "-show-binding-warnings=false". But what I am interested to achieve is to suppress run time warnings (especially binding warnings - since I am getting data in model mostly in XML structures and it is fine for me if its unable to bind to its nested child nodes) in console (I am working on flex on Eclipse with the flex plug in). Is there a way to achieve it?

Upvotes: 5

Views: 1542

Answers (1)

user797257
user797257

Reputation:

  1. Flex bindings can bind to nested child nodes (by using XML#notifications()). Your code must be doing it wrong (using array access for example). Consider fixing your code instead of silencing the warnings.

  2. Alternatively, avoid the bindings what so ever. Bindings are a way for lazy people to shoot off both their legs. They are fine in prototype / mock-up code, but unreliable / bad in production code.

  3. If you still want to do what you originally asked for. You could do something like this:

    • Create folder mx/binding/ on your classpath.
    • Copy Binding.as there.
    • Find all instances, where it calls trace() and replace them using something like this the following.

if (BindingManager.debugDestinationStrings[destString])
{
    trace("Binding: destString = " + destString + ", error = " + itemPendingError);
}

to


CONFIG::logBindings
{
if (BindingManager.debugDestinationStrings[destString])
{
    trace("Binding: destString = " + destString + ", error = " + itemPendingError);
}
}
  • Add -define=CONFIG::logBindings,false to your project settings.

Upvotes: 2

Related Questions