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

  • Home
  • SEARCH
  • 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 8458335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:03:04+00:00 2026-06-10T13:03:04+00:00

I understand that when creating a custom component, it’s normally best practice to defer

  • 0

I understand that when creating a custom component, it’s normally best practice to defer any property changes to it by using setters/getters, setting a “dirty” flag, calling invalidateProperties(), and then letting commitProperties() handle the actual changes.

But in the case where properties only affect Spark components, wouldn’t this be redundant since Spark components already defer their property changes?

For instance, say I have a custom UIComponent that contains a Spark Button and I want to expose a buttonLabel property for it that changes the label of the button:

private var _buttonLabel:String;
private var myBtn:Button;
private var _buttonLabelChanged:Boolean = false;
function set buttonLabel(lbl:String){
   _buttonLabel = lbl;
   _buttonLabelChanged = true;
   invalidateProperties();
}

So then setting the buttonLabel property will then eventually trigger:

override protected function commitProperties(){
    if(_buttonLabelChanged){
          myBtn.label = _buttonLabel;
         _buttonLabelChanged = false;
    }
}

But the setter for “label” in the Spark Button class is already using an invalidation process which makes the above code pointless, yes? Or am I missing something?

  • 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-06-10T13:03:06+00:00Added an answer on June 10, 2026 at 1:03 pm

    But in the case where properties only affect Spark components,
    wouldn’t this be redundant since Spark components already defer their
    property changes?

    I don’t believe this is a true statement. Spark Components do not defer their property changes any differently than MX Components.

    But the setter for “label” in the Spark Button class is already using
    an invalidation process which makes the above code pointless, yes? Or
    am I missing something?

    Yes, you are missing the fact that every spark component has it’s own invalidation cycle. this is no different from MX Components in which one MX Component contains another.

    I’m not clear, but you appear to be looking at two identical things (MX Invalidation and Spark invalidation) and saying they are different.

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

Sidebar

Related Questions

I understand that using Perfmon.msc you can create a custom performance counter and by
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
I understand that we can set the various style attributes from code behind using
I am new to creating plug-ins, and there's much that I don't understand. One
I'm creating a custom ViewController. This VC needs to load some data that is
I was reading about Django's support for custom user profiles. I understand that if
I need to create a custom Component with JSF 2.0 (not composite component), that
I'm creating a custom control that contains other controls, including two scroll bars, one
I'm creating a custom html helper that will allow me to group multiple checkboxes
I'm thinking of creating a custom made rounded corners block using only divs, and

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.