1 Reply Latest reply on Feb 26, 2007 6:15 AM by peterent

    Set property on component from outside the component?

    WestSide Level 1

      I am trying to find out how I can set properties on a component from outside the component. This has been a constant problem of mine that I am sure can be easily solved by someone more knowledgeable.

      I have a remote object call and in the result handler I want to do something like :

      var contactAccordion:Button = accordion.getHeaderAt(1);
      contactAccordion.enabled = true;

      In my view component that I created I have this :

      <mx:Accordion id="accordion" creationPolicy="all">

      When my view component, the one with the accordion in it is shown, initially when the screen is displayed I set the all accordion panels to disabled via the creationComplete() except the first one which is shown by default. Once I get the result back from my Remote Object call, I want to enable a specific panel for example.

      How can I get a referecne to the "Accordion" from outside of it? I am using Cairngorm 2.1 here, but if someone can assist me, I figure I can get it to work within Cairngorm, my problem just seems to be how does one reference a component outside of the actual component.

      Help highly appreciated as always.