Skip navigation
Juanjo-kun
Currently Being Moderated

Binding executes an abnormal number of times

Mar 9, 2010 7:14 AM

I'm using the Cairngorm framework. I'm a newbie in Flex, also.

 

Dispatching a simple CairngormEvent, a command that modifies a property using a setter is executed. This setter has just two lines of code: asign the received value to an internal property, and dispatch the event that the getter is associated to. Why is the getter executing two times? Has Cairngorm something to do with this problem?

 

Also... if I have this Label component

 

<mx:Label id="myLabel" text={myVar} />

 

why is the getter of "myVar" executing 4 times when the application is loaded? Is it normal?

 

I hope you can help me with these questions. Thank you!

  • Currently Being Moderated
    Adobe Employee
    Mar 9, 2010 12:40 PM

    Generic binding using {} is redundant in order to handle out-of-order

    instantiation.  If that is a performance issue, directly handling events is

    a way to optimize

    |
    Mark as:
  • Currently Being Moderated
    Adobe Employee
    Mar 9, 2010 5:38 PM

    {} binding is a great way to get an app up in a hurry.  I use it in most of

    my prototypes and will only remove them if I see they are a bottleneck.

    Even though it is redundant, a moderate amount of binding shouldn't cost you

    that much.

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points