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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:50:20+00:00 2026-05-22T18:50:20+00:00

I have Class1 with a read-only bindable property called age : public class Class1

  • 0

I have Class1 with a read-only bindable property called age:

public class Class1 {
  private var _age:int;

  [Bindable(event="ageChanged"]
  public function get age():int {
    return this._age;
  }

  public function something():void {
    _age++;
    dispatchEvent(new Event("ageChanged"));
  }
}

I also have Class2 which contains a private instance of Class1. And I want to make property age available from Class1 and still be bindable.

public class Class2 {
  private var c1:Class1 = new Class1();

  [Bindable????]
  public function get age():int {
  }
}

Of course the [Bindable] tag there doesn’t make sense. But how can I achieve the same effect?

I believe I can dispatch some sort of ageChanged event from Class2 up to Class1 and then have an event handler in Class1 dispatch another local ageChanged event to which I bind Class2‘s age property.

But this sounds unnecessarily complicated. Isn’t there a simpler way? 🙂

Thanks!

  • 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-22T18:50:20+00:00Added an answer on May 22, 2026 at 6:50 pm

    Personally, I’ve just put my composite class as public and access it from the view if it’s a model (which i think it is). If you don’t want to do that, you can always use BindingUtils:

    In the class 2 constructor

    var watcher:ChangeWatcher = BindingUtils.bindProperty(this, 'age', c1, 'age');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that defines a read-only property that effectively exposes a private
I have a class with a read-only property defined. In my code I define
I have created a read-only property(name) in class1. How can I use this name
So I have the following: public class Singleton { private Singleton(){} public static readonly
I have read that private variables in a base class are technically inherited by
I have a class called SparseMatrix which contain a private vector of type Cell.
In a Python program I have a read-only property that I create using bla
I have a LINQ to SQL generated class with a readonly property: <Column(Name:=totalLogins, Storage:=_TotalLogins,
Lets say I have a concrete class Class1 and I am creating an anonymous
I have class A: public class ClassA<T> Class B derives from A: public class

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.