Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4592288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:31:02+00:00 2026-05-21T22:31:02+00:00

I never really understood the point of binding, beyond it being effectively shorthand for

  • 0

I never really understood the point of binding, beyond it being effectively shorthand for addeventlistener.

is there more to it? am I missing something?

thanks,
dsdsdsdsd

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:31:03+00:00Added an answer on May 21, 2026 at 10:31 pm

    Data binding is all about declaratively defining how data is displayed in the UI. Under the hood, it is a bit more complicated, because there are more needs than just hooking addEventListener to support the features of data binding.

    It is a very powerful feature, actually, and to understand it more, we can look at a simple “Hello World” application:

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark">
        <s:HGroup>
            <s:TextInput id="input" />
            <s:Label text="Hello {input.text}" />
        </s:HGroup>
    
    </s:Application>
    

    Now, compile this app with the --keep compiler flag and look at the new folder “bin-debug/generated”. We are interested in HelloWorld-generated.as

    Here is where that binding gets defined and called from the constructor:

    private function _HelloWorld_bindingsSetup():Array
    {
        var result:Array = [];
    
        result[0] = new mx.binding.Binding(this,
            function():String
            {
                var result:* = "Hello " + (input.text);
                return (result == undefined ? null : String(result));
            },
            null,
            "_HelloWorld_Label1.text"
            );
    
    
        return result;
    }
    

    A little later, in the HelloWorld constructor, you get a call to set up the watchers:

            _watcherSetupUtil.setup(this,
                    function(propertyName:String):* { return target[propertyName]; },
                    function(propertyName:String):* { return HelloWorld[propertyName]; },
                    bindings,
                    watchers);
    

    Which really just does this:

    watchers[0] = new mx.binding.PropertyWatcher("input", 
                                                { propertyChange: true }, 
                                                [ bindings[0] ] , 
                                                propertyGetter );
    watchers[1] = new mx.binding.PropertyWatcher("text",
                                                 { change: true,
                                                   textChanged: true },
                                                 [ bindings[0] ],
                                                 null);
    

    Things get more complicated with two-way bindings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have often heard this term being used, but I have never really understood
I've never really understood on how to do it. I want to where where
I've used MySQL (via PHPMyAdmin) a lot before but never really understood half of
This answer hit a nerve with me on something I have never understood with
I'm a mostly self taught programmer and one aspect I've never really understood is
I am trying to swap two strings in Java. I never really understood strings
One thing I've never really understood is why in many libraries, constants are defined
I never really know what order is the best installation or if it even
I've never really done much with parsing text in PHP (or any language). I've
I have never really done much C but am starting to play around with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.