Skip navigation
Currently Being Moderated

Defining data bindings in ActionScript

Apr 2, 2012 9:11 AM

 
Replies
  • Currently Being Moderated
    Apr 2, 2012 9:11 AM   in reply to Community Help

    How would one apply this to situations where the bound variable is a primitive? For instance,

    var watcherSetter:ChangeWatcher =

                        BindingUtils.bindSetter(updateMyString, someString, ????what goes here????);

     

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 11:06 AM   in reply to GurtnamonaIE

    By my reading, in this case, the third arg is a String that contains the name of a public bindable property of the host object. I don't think data type comes into play.

     

    Am I missing something?

     

    Randy Nielsen

    Senior Content and Community Manager

    Adobe Systems Incorporated

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 11:22 AM   in reply to GurtnamonaIE

    Hopefully, you’ve declared someString as a property on some object.

    The second parameter is the object, the third parameter is the name of the property “someString”.

     

    If in doubt, post a short code snippet.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 3:55 PM   in reply to GurtnamonaIE

    I was looking for the equivalent of:

    <s:Label id="myLabel" text="{myString}"/>

     

    Realized it would be simply:

    BindingUtils.bindSetter(updateMyString, this, "myString");

     

    Thanks for the responses.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points