Skip navigation
Home/Support/

Forums

29 Views 4 Replies Latest reply: Mar 10, 2010 1:08 AM by Juanjo-kun RSS
Juanjo-kun User 8 posts since
Jan 12, 2010
Currently Being Moderated

Mar 9, 2010 7:14 AM

Binding executes an abnormal number of times

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!

  • Flex harUI Adobe Employee 7,125 posts since
    May 18, 2006
    Currently Being Moderated
    1. Mar 9, 2010 12:40 PM (in response to Juanjo-kun)
    Re: Binding executes an abnormal number of times

    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

  • Flex harUI Adobe Employee 7,125 posts since
    May 18, 2006
    Currently Being Moderated
    3. Mar 9, 2010 5:38 PM (in response to Juanjo-kun)
    Re: Binding executes an abnormal number of times

    {} 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.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

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