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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:43:54+00:00 2026-05-13T15:43:54+00:00

I trying to extends ObjectProxy class, the reason is because I want to have

  • 0

I trying to extends ObjectProxy class, the reason is because I want to have a Singleton of the ObjectProxy class, so I made something like

package utils
{
    import mx.utils.ObjectProxy;

    public class UniformObjectProxy extends ObjectProxy
    {
        private static var _instance:UniformObjectProxy;

        public function UniformObjectProxy(secure:PrivateClass, item:Object=null, uid:String=null, proxyDepth:int=-1)
        {
            super(item, uid, proxyDepth);
        }

        public static function getInstance(item:Object=null):UniformObjectProxy{
            if(UniformObjectProxy._instance == null){
                var security:PrivateClass = new PrivateClass();
                UniformObjectProxy._instance = new UniformObjectProxy(security, item);
            }
            return UniformObjectProxy._instance;
        }
    }
}

class PrivateClass{
    public function PrivateClass(){

    }
}

when I create my object uniform which is a simple object, I pass it to my UniformObjectProxy.getInstance() static method to get the instance of my objectProxy, ok so far so good

my problem is when I try to bind a property of my objectProxy instance like

_opc = UniformObjectProxy.getInstance(_uniform);
cw:ChangeWatcher = BindingUtils.bindSetter(dispatchColorChange, _opc, data.id);

the dispatchColorChange handler function is called only once an never again, I had check ChangeWatcher.isWatching() and return false meaning my objectProxy is not binding properly, if I create an objectProxy like

_opc = new ObjectProxy(_uniform);
cw:ChangeWatcher = BindingUtils.bindSetter(dispatchColorChange, _opc, data.id);

the binds works just fine, so my thinking is the problem is when I extends the objectProxy class, how is the proper way to do this, please help me!, thanks for any clue!!

  • 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-13T15:43:54+00:00Added an answer on May 13, 2026 at 3:43 pm

    There seems to be problems extending ObjectProxy (personally I encountered namespace issues while trying overriding the setProperty method and have the feeling this class is just not meant to be used the same way as the Proxy class).

    Not a direct answer to your question but I guess you shouldn’t have to stick to the singleton pattern just for the sake of it. To get the same access/result described above I would suggest doing something like this :

    package utils
    {
        import mx.utils.ObjectProxy;
    
        public class UniformObjectProxy
        {
            private static var _proxy:ObjectProxy;
    
            public function UniformObjectProxy()
            {
                throw("do not instantiate me!")
            }
    
            public static function getProxy(item:Object=null):ObjectProxy{
                if(_proxy == null){
                    _proxy = new ObjectProxy(item);
                }
                return _proxy;
            }
        }
    }
    

    and then :

    var _opc:ObjectProxy = UniformObjectProxy.getProxy(_uniform);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to do something like: public interface Order { public List<? extends OrderItem> getItems();
I'm trying to use both extends and include tags in one template, just like:
I'm trying to make a class that extends qwidget, that pops up a new
I was dealing with hibernate, trying to figure out the run-time class behind proxied
I've an Entity Framework model (v.1.0) that I'm trying to extends with a calculated
I'm trying to connect my FooServlet which extends HttpServlet with the ApplicationContext which is
I am just trying to understand the extends keyword in Java Generics. List<? extends
I am trying to set up a sites navigation which extends over several levels.
I'm having a very weird problem with a vector in my application. Details... I

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.