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 6897671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:11:54+00:00 2026-05-27T07:11:54+00:00

How to send to the skin some value which have changed?

  • 0

How to send to the skin some value which have changed?

  • 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-27T07:11:55+00:00Added an answer on May 27, 2026 at 7:11 am

    There are two approaches to this: one uses binding and is easier, the other is more complex but better for performance.

    Using binding

    Suppose your view class looks like this:

    public class MyClass extends SkinnableComponent {
        [Bindable] public var myValue:String;
    }
    

    then you can bind to that value in your skin like this:

    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
            xmlns:s="library://ns.adobe.com/flex/spark">
    
        <fx:Metadata>
            [HostComponent("MyClass")]
        </fx:Metadata>
    
       <s:Label id="myLabel" text="{hostComponent.myValue}" />
    
    </s:Skin>
    

    Overriding commitProperties

    Assume the same skin without the binding, then you can set the label’s text property by using a skinpart and overriding commitProperties in the host component. The skinpart’s name must be exactly the same as the id of the component in the skin (in this case ‘myLabel’).

    public class MyClass extends SkinnableComponent {
    
        [SkinPart(required="true")]
        public var myLabel:Label;
    
        public var myValue:String;
    
        override protected function commitProperties():void {
            if (myLabel) myLabel.text = myValue;
            super.commitProperties();
        }
    }
    

    Of course you would have to call invalidateProperties() whenever you want to apply the new value (for instance in a setter function for ‘myLabel’). Also notice that ‘myLabel’ no longer needs to be bindable, unless you would want to be able to bind on it externally.


    edit: which approach to choose?

    I have just answered a question that is closely related to this one in which I elaborate on the pro’s and cons of each approach in different situations. You can find it here: Flex: Additional label in ButtonBarButton

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

Sidebar

Related Questions

We send out registration urls to clients via email. Some of the email clients
i send ajax requests with jquery, and i have a function: $('input').ajaxSuccess(function(e, xhr, settings)
I send some data from my App to a web service and it replies.
how to send jqGrid data in json format to server? DO I have to
I need to send MMS thought a C# application. I have already found 2
We send out emails to users with the latest jobs, so we have a
We send out a notification email whenever we have phishing emails reported to us.
I send some parameters to an ASP.NET method using the code: $.ajax({ url: /default.aspx/test.test,
I send to the javascript an array like: $.each(data, function (value, name) { $('#visitStart').append($('<option></option>').val(value).html(value));
I send some data from MAC to PC. From MAC I send it from

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.